LogCabin
|
This handles events from messageSocket. More...
Public Member Functions | |
MessageSocketHandler (ClientSession &clientSession) | |
void | handleReceivedMessage (MessageId messageId, Core::Buffer message) |
This method is overridden by a subclass and invoked when a new message is received. | |
void | handleDisconnect () |
This method is overridden by a subclass and invoked when the socket has been disconnected and will be closed soon. | |
Public Attributes | |
ClientSession & | session |
This handles events from messageSocket.
Definition at line 149 of file ClientSession.h.
LogCabin::RPC::ClientSession::MessageSocketHandler::MessageSocketHandler | ( | ClientSession & | clientSession | ) | [explicit] |
Definition at line 74 of file ClientSession.cc.
void LogCabin::RPC::ClientSession::MessageSocketHandler::handleReceivedMessage | ( | MessageId | messageId, |
Core::Buffer | contents | ||
) | [virtual] |
This method is overridden by a subclass and invoked when a new message is received.
This method will be invoked by the main event loop on whatever thread is running the Event::Loop.
messageId | An opaque identifier for the message set by the sender. |
contents | The data received. |
Implements LogCabin::RPC::MessageSocket::Handler.
Definition at line 81 of file ClientSession.cc.
void LogCabin::RPC::ClientSession::MessageSocketHandler::handleDisconnect | ( | ) | [virtual] |
This method is overridden by a subclass and invoked when the socket has been disconnected and will be closed soon.
It is safe to destroy the MessageSocket during this call. This method will be invoked by the main event loop at any time on whatever thread is running the Event::Loop.
Note that MessageSocket::close() calls this method as well, even if it's already been called.
Implements LogCabin::RPC::MessageSocket::Handler.
Definition at line 136 of file ClientSession.cc.
Definition at line 154 of file ClientSession.h.