RESTinio
|
TCP connection base. More...
#include <tcp_connection_ctx_base.hpp>
Public Member Functions | |
tcp_connection_ctx_base_t (connection_id_t id) | |
virtual | ~tcp_connection_ctx_base_t ()=default |
connection_id_t | connection_id () const noexcept |
Get connection id. More... | |
virtual void | check_timeout (std::shared_ptr< tcp_connection_ctx_base_t > &self)=0 |
Check timeouts for all activities. More... | |
Protected Member Functions | |
template<typename Derived > | |
std::shared_ptr< Derived > | shared_from_concrete () |
Cast self to derived class. More... | |
Private Attributes | |
const connection_id_t | m_connection_id |
Id of a connection. More... | |
TCP connection base.
Class serves as a root class for all connection context wrappers, that can be passed in asio callbacks.
Definition at line 27 of file tcp_connection_ctx_base.hpp.
|
inline |
Definition at line 31 of file tcp_connection_ctx_base.hpp.
|
virtualdefault |
|
pure virtual |
Check timeouts for all activities.
self | A handle to itself (eliminates one shared_ptr instantiation). |
|
inlinenoexcept |
Get connection id.
Definition at line 38 of file tcp_connection_ctx_base.hpp.
|
inlineprotected |
Cast self to derived class.
Definition at line 51 of file tcp_connection_ctx_base.hpp.
|
private |
Id of a connection.
Definition at line 58 of file tcp_connection_ctx_base.hpp.