This is the dispatch handler that gets installed as the default handler for the TCP connection. More...
Public Member Functions | |
ResponseHandlerTCP () | |
virtual void | handle (EventPtr &event_ptr) |
Callback method. More... | |
bool | wait_for_connection () |
virtual bool | get_response (EventPtr &event_ptr) |
Public Member Functions inherited from ResponseHandler | |
ResponseHandler () | |
virtual | ~ResponseHandler () |
Public Member Functions inherited from Hypertable::DispatchHandler | |
virtual | ~DispatchHandler () |
Destructor. More... | |
Private Attributes | |
bool | m_connected |
Additional Inherited Members | |
Protected Attributes inherited from ResponseHandler | |
std::queue< EventPtr > | m_queue |
std::mutex | m_mutex |
std::condition_variable | m_cond |
This is the dispatch handler that gets installed as the default handler for the TCP connection.
It queues up responses that can be fetched by the application via a call to GetResponse() GetResponse() returns false when the connection is disconnected.
Definition at line 122 of file sampleClient.cc.
|
inline |
Definition at line 126 of file sampleClient.cc.
|
inlinevirtual |
Implements ResponseHandler.
Definition at line 164 of file sampleClient.cc.
|
inlinevirtual |
Callback method.
When the Comm layer needs to deliver an event to the application, this method is called to do so. The set of event types include, CONNECTION_ESTABLISHED, DISCONNECT, MESSAGE, ERROR, and TIMER.
event_ptr | smart pointer to Event object |
Implements ResponseHandler.
Definition at line 128 of file sampleClient.cc.
|
inline |
Definition at line 156 of file sampleClient.cc.
|
private |
Definition at line 177 of file sampleClient.cc.