44 lock_guard<mutex> lock(m_mutex);
45 m_receive_queue.push(event_ptr);
51 unique_lock<mutex> lock(m_mutex);
53 m_cond.wait(lock, [
this](){
return !m_receive_queue.empty(); });
55 event_ptr = m_receive_queue.front();
56 m_receive_queue.pop();
67 unique_lock<mutex> lock(m_mutex);
69 m_cond.wait(lock, [
this](){
return !m_receive_queue.empty(); });
71 EventPtr event = m_receive_queue.front();
72 m_receive_queue.pop();
static int32_t response_code(const Event *event)
Returns the response code from an event event generated in response to a request message.
virtual void handle(EventPtr &event)
Event Dispatch method.
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Connection established event.
bool wait_for_reply(EventPtr &event)
This method is used by a client to synchronize.
DispatchHandlerSynchronizer()
Constructor.
Logging routines and macros.
Compatibility Macros for C/C++.
Connection disconnected event.
Declarations for Protocol.
Request/response message event.
Error codes, Exception handling, error logging.
#define HT_THROW(_code_, _msg_)
Declarations for DispatchHandlerSynchronizer.
bool wait_for_connection()
Waits for CONNECTION_ESTABLISHED event.