|
using | ptr_t = ::boost::intrusive_ptr< ConnectionHandler > |
|
using | io_context = ::boost::asio::io_context |
|
using | member_hook_t = detail::member_hook< ConnectionHandler, detail::connection_hook, &ConnectionHandler::hook_ > |
|
using | flush_hook_t = detail::member_hook< ConnectionHandler, detail::connection_hook, &ConnectionHandler::flush_hook_ > |
|
|
| ConnectionHandler (IoContext *context) noexcept |
|
void | Init (::boost::asio::ip::tcp::socket &&sock) |
|
void | Close () |
|
IoContext & | context () |
|
|
virtual bool | FlushWrites () |
| Called to flush pending writes to the socket. Returns true if flush took place,.
|
|
virtual void | OnOpenSocket () |
| Called once after connection was initialized. Will run in io context thread of this handler.
|
|
virtual void | OnCloseSocket () |
| Called before ConnectionHandler destroyed but after the socket was signalled to stop and shutdown. More...
|
|
virtual boost::system::error_code | HandleRequest ()=0 |
|
Definition at line 33 of file connection_handler.h.
◆ OnCloseSocket()
virtual void util::ConnectionHandler::OnCloseSocket |
( |
| ) |
|
|
inlineprotectedvirtual |
Called before ConnectionHandler destroyed but after the socket was signalled to stop and shutdown.
The function implementation may block the calling fiber. Derived ConnectionHandler should clean here resources that must closed before the object is destroyed. Will run in io context thread of the socket.
Definition at line 101 of file connection_handler.h.
◆ use_flusher_fiber_
bool util::ConnectionHandler::use_flusher_fiber_ = false |
|
protected |
The documentation for this class was generated from the following files: