Flow-IPC 3.0.0
Flow-IPC project: Public API.
Namespaces | Classes | Typedefs | Functions
ipc::session::shm::classic Namespace Reference

Support for SHM-backed ipc::session sessions and session-servers with the SHM-classic (ipc::shm::classic::Pool_arena) provider. More...

Namespaces

namespace  rpc
 Sub-namespace containing utilities useful when working with capnp-RPC-with-zero-copy module of Flow-IPC (transport::struc::shm::rpc) – assuming one has chosen SHM-classic as the SHM-provider for such work.
 

Classes

class  Server_session
 Identical to session::Server_session in every way, except that it makes available two SHM arenas, from the SHM-classic provider (ipc::shm::classic::Pool_arena), symmetrically accessible by the opposing side. More...
 
class  Session_mv
 Implements the SHM-related API common to shm::classic::Server_session and shm::classic::Client_session. More...
 
class  Session_server
 This is to vanilla Session_server what shm::classic::Server_session is to vanilla Server_session: it is the session-server type that starts SHM-enabled sessions with SHM-classic provider (ipc::shm::classic::Pool_arena). More...
 

Typedefs

template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload = ::capnp::Void>
using Client_session = Session_mv< session::Client_session_mv< Client_session_impl< MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload > > >
 This is to session::Client_session what shm::classic::Server_session is to session::Server_session. More...
 

Functions

template<typename Session_t >
std::ostream & operator<< (std::ostream &os, const Session_mv< Session_t > &val)
 Prints string representation of the given Session_mv to the given ostream. More...
 
template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & operator<< (std::ostream &os, const Server_session< MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload > &val)
 Prints string representation of the given Server_session to the given ostream. More...
 
template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & operator<< (std::ostream &os, const Session_server< MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload > &val)
 Prints string representation of the given Session_server to the given ostream. More...
 

Detailed Description

Support for SHM-backed ipc::session sessions and session-servers with the SHM-classic (ipc::shm::classic::Pool_arena) provider.

See the doc header for the general ipc::session::shm namespace.

Typedef Documentation

◆ Client_session

template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload = ::capnp::Void>
using ipc::session::shm::classic::Client_session = typedef Session_mv <session::Client_session_mv <Client_session_impl<MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload> >>

This is to session::Client_session what shm::classic::Server_session is to session::Server_session.

In terms of additional (to that of Client_session) public behavior, from the public API user's point of view, this class template alias is simply ~exactly identical/symmetrical to shm::classic::Server_session. See its doc header. That is during PEER state.

Warning
See same-named section of session::Client_session_mv ctor doc header. In short: the Client_app and Server_app passed to the ctor must outlive *this.

The only difference is shm::classic::Server_session::app_shm() and shm::classic::Client_session::app_shm() (actually Session_mv::app_shm() = both) differ in terms of how one views the lifetime of the underlying SHM areas. This is reflected in the latter's doc header. Essentially, though, the Arena* returned by the former can be used beyond the returning *this being destroyed, as long as its parent shm::classic::Session_server – or another shm::classic::Server_session from it, with the same Client_app – is alive (which is typical). In contrast that is not true of that returned by shm::classic::Client_session::app_shm(); but since the destruction of a Client_session implies either the process is itself going down, or the opposing server process (and thus shm::classic::Session_server) is going down/has gone down, this should not be relevant, as those objects should never be accessed again anyway.

Template Parameters
MQ_TYPE_OR_NONEIdentical to session::Client_session.
TRANSMIT_NATIVE_HANDLESIdentical to session::Client_session.
Mdt_payloadIdentical to session::Client_session.

Function Documentation

◆ operator<<() [1/3]

template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & ipc::session::shm::classic::operator<< ( std::ostream &  os,
const Server_session< MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload > &  val 
)

Prints string representation of the given Server_session to the given ostream.

Parameters
osStream to which to write.
valObject to serialize.
Returns
os.

◆ operator<<() [2/3]

template<typename Session_t >
std::ostream & ipc::session::shm::classic::operator<< ( std::ostream &  os,
const Session_mv< Session_t > &  val 
)

Prints string representation of the given Session_mv to the given ostream.

Parameters
osStream to which to write.
valObject to serialize.
Returns
os.

◆ operator<<() [3/3]

template<session::schema::MqType MQ_TYPE_OR_NONE, bool TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & ipc::session::shm::classic::operator<< ( std::ostream &  os,
const Session_server< MQ_TYPE_OR_NONE, TRANSMIT_NATIVE_HANDLES, Mdt_payload > &  val 
)

Prints string representation of the given Session_server to the given ostream.

Parameters
osStream to which to write.
valObject to serialize.
Returns
os.