22 #ifndef Hyperspace_ClientConnectionHandler_h
23 #define Hyperspace_ClientConnectionHandler_h
25 #include <boost/thread/condition.hpp>
33 #include <condition_variable>
55 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
60 std::lock_guard<std::recursive_mutex> lock(
m_mutex);
65 HT_WARNF(
"Connection attempt to htHyperspace "
72 HT_ERRORF(
"Problem establishing TCP connection with htHyperspace "
106 #endif // Hyperspace_ClientConnectionHandler_h
struct sockaddr_in m_master_addr
#define HT_WARNF(msg,...)
int connect(const CommAddress &addr, const DispatchHandlerPtr &default_handler)
Establishes a TCP connection and attaches a default dispatch handler.
Abstract base class for application dispatch handlers registered with AsyncComm.
std::recursive_mutex m_mutex
int initiate_connection(struct sockaddr_in &addr)
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
std::condition_variable_any m_cond
std::shared_ptr< ClientConnectionHandler > ClientConnectionHandlerPtr
Shared smart pointer to ClientConnectionHandler.
Declarations for DispatchHandler.
const char * get_text(int error)
Returns a descriptive error message.
void close_socket(const CommAddress &addr)
Closes the socket specified by the addr argument.
void set_verbose_mode(bool verbose)
String format(int sep= ':') const
Returns a string with a dotted notation ("127.0.0.1:8080") including the port.
Entry point to AsyncComm service.
virtual ~ClientConnectionHandler()
void set_session_id(uint64_t id)
Internet address wrapper classes and utility functions.
#define HT_ERRORF(msg,...)
ClientConnectionHandler(Comm *comm, Session *session, uint32_t timeout_ms)
Error codes, Exception handling, error logging.
virtual void handle(Hypertable::EventPtr &event_ptr)
Callback method.