LogCabin
|
Couples a MessageSocketHandler with a MessageSocket (monitor) and destroys them in the right order (monitor first). More...
Public Member Functions | |
~SocketWithHandler () | |
Static Public Member Functions | |
static std::shared_ptr < SocketWithHandler > | make (OpaqueServer *server, int fd) |
Return a newly constructed SocketWithHandler, with the handler's self field pointing to itself. | |
Public Attributes | |
MessageSocketHandler | handler |
MessageSocket | monitor |
Private Member Functions | |
SocketWithHandler (OpaqueServer *server, int fd) |
Couples a MessageSocketHandler with a MessageSocket (monitor) and destroys them in the right order (monitor first).
This class is reference-counted with std::shared_ptr. Usually, one strong reference exists in OpaqueServer::sockets, which keeps this object alive. Weak references exist OpaqueServerRPC objects and in MessageSocketHandler::self (to copy into OpaqueServerRPC objects).
Definition at line 160 of file OpaqueServer.h.
Definition at line 119 of file OpaqueServer.cc.
LogCabin::RPC::OpaqueServer::SocketWithHandler::SocketWithHandler | ( | OpaqueServer * | server, |
int | fd | ||
) | [private] |
Definition at line 111 of file OpaqueServer.cc.
std::shared_ptr< OpaqueServer::SocketWithHandler > LogCabin::RPC::OpaqueServer::SocketWithHandler::make | ( | OpaqueServer * | server, |
int | fd | ||
) | [static] |
Return a newly constructed SocketWithHandler, with the handler's self field pointing to itself.
server | Server that owns this object. Held by MessageSocketHandler. |
fd | TCP connection with client for MessageSocket. |
Definition at line 103 of file OpaqueServer.cc.
Definition at line 174 of file OpaqueServer.h.
Definition at line 175 of file OpaqueServer.h.