LogCabin
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Public Attributes | Private Member Functions
LogCabin::RPC::OpaqueServer::SocketWithHandler Struct Reference

Couples a MessageSocketHandler with a MessageSocket (monitor) and destroys them in the right order (monitor first). More...

List of all members.

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)

Detailed Description

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.


Constructor & Destructor Documentation

Definition at line 119 of file OpaqueServer.cc.

Definition at line 111 of file OpaqueServer.cc.


Member Function Documentation

Return a newly constructed SocketWithHandler, with the handler's self field pointing to itself.

Parameters:
serverServer that owns this object. Held by MessageSocketHandler.
fdTCP connection with client for MessageSocket.

Definition at line 103 of file OpaqueServer.cc.


Member Data Documentation

Definition at line 174 of file OpaqueServer.h.

Definition at line 175 of file OpaqueServer.h.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines