Flow-IPC 1.0.2
Flow-IPC project: Public API.
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...

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<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload = ::capnp::Void>
using Client_session = Session_mv< session::Client_session_mv< Client_session_impl< S_MQ_TYPE_OR_NONE, S_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<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & operator<< (std::ostream &os, const Server_session< S_MQ_TYPE_OR_NONE, S_TRANSMIT_NATIVE_HANDLES, Mdt_payload > &val)
 Prints string representation of the given Server_session to the given ostream. More...
 
template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & operator<< (std::ostream &os, const Session_server< S_MQ_TYPE_OR_NONE, S_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<schema::MqType S_MQ_TYPE_OR_NONE, bool S_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<S_MQ_TYPE_OR_NONE, S_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.

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 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
S_MQ_TYPE_OR_NONEIdentical to session::Client_session.
S_TRANSMIT_NATIVE_HANDLESIdentical to session::Client_session.
Mdt_payloadIdentical to session::Client_session.

Function Documentation

◆ operator<<() [1/3]

template<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & ipc::session::shm::classic::operator<< ( std::ostream &  os,
const Server_session< S_MQ_TYPE_OR_NONE, S_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<schema::MqType S_MQ_TYPE_OR_NONE, bool S_TRANSMIT_NATIVE_HANDLES, typename Mdt_payload >
std::ostream & ipc::session::shm::classic::operator<< ( std::ostream &  os,
const Session_server< S_MQ_TYPE_OR_NONE, S_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.