thrift_asio_connection_management_mixin.hpp
43 virtual void on_client_connected(boost::shared_ptr<apache::thrift::protocol::TProtocol> output_protocol)
56 virtual void on_client_disconnected(const boost::shared_ptr<apache::thrift::protocol::TProtocol>& output_protocol, const boost::system::error_code& ec)
64 virtual void before_process(boost::shared_ptr<apache::thrift::protocol::TProtocol> output_protocol)
client_map clients_
All connected clients.
Definition: thrift_asio_connection_management_mixin.hpp:87
std::map< protocol_ptr, client_ptr > client_map
maps protocol instances to clients
Definition: thrift_asio_connection_management_mixin.hpp:84
virtual void on_client_disconnected(const boost::shared_ptr< apache::thrift::protocol::TProtocol > &output_protocol, const boost::system::error_code &ec)
erases the client associated with output_protocol from clients_
Definition: thrift_asio_connection_management_mixin.hpp:56
virtual void before_process(boost::shared_ptr< apache::thrift::protocol::TProtocol > output_protocol)
sets client associated with output_protocol as the current_client_
Definition: thrift_asio_connection_management_mixin.hpp:64
client_ptr current_client_
Only valid while a request is processed.
Definition: thrift_asio_connection_management_mixin.hpp:90
Definition: thrift_asio_connection_management_mixin.hpp:39
boost::shared_ptr< apache::thrift::protocol::TProtocol > protocol_ptr
used as key_type in the client_map
Definition: thrift_asio_connection_management_mixin.hpp:78
virtual void after_process()
sets the current_client_ to zero
Definition: thrift_asio_connection_management_mixin.hpp:72
std::shared_ptr< ClientType > client_ptr
used as mapped_type in the client_map
Definition: thrift_asio_connection_management_mixin.hpp:81
virtual void on_client_connected(boost::shared_ptr< apache::thrift::protocol::TProtocol > output_protocol)
creates a ClientType objects and inserts it into clients_
Definition: thrift_asio_connection_management_mixin.hpp:43
