restinio::tcp_connection_ctx_base_t Class Referenceabstract

TCP connection base. More...

`#include <tcp_connection_ctx_base.hpp>`

Inheritance diagram for restinio::tcp_connection_ctx_base_t:

## 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...

## Detailed Description

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.

## Constructor & Destructor Documentation

## tcp_connection_ctx_base_t()

restinio::tcp_connection_ctx_base_t::tcp_connection_ctx_base_t | ( | connection_id_t | id | ) |

inline

Definition at line 31 of file tcp_connection_ctx_base.hpp.

## ~tcp_connection_ctx_base_t()

virtual restinio::tcp_connection_ctx_base_t::~tcp_connection_ctx_base_t | ( |  | ) |

virtualdefault

## Member Function Documentation

## check_timeout()

virtual void restinio::tcp_connection_ctx_base_t::check_timeout | ( | std::shared_ptr< tcp_connection_ctx_base_t > & | self | ) |

pure virtual

Check timeouts for all activities.

Parameters

  self | A handle to itself (eliminates one shared_ptr instantiation).

## connection_id()

connection_id_t restinio::tcp_connection_ctx_base_t::connection_id | ( |  | ) | const

inlinenoexcept

Get connection id.

Definition at line 38 of file tcp_connection_ctx_base.hpp.

## shared_from_concrete()

template<typename Derived >

std::shared_ptr< Derived > restinio::tcp_connection_ctx_base_t::shared_from_concrete | ( |  | ) |

inlineprotected

Cast self to derived class.

Definition at line 51 of file tcp_connection_ctx_base.hpp.

## Member Data Documentation

## m_connection_id

const connection_id_t restinio::tcp_connection_ctx_base_t::m_connection_id

private

Id of a connection.

Definition at line 58 of file tcp_connection_ctx_base.hpp.

The documentation for this class was generated from the following file:

- restinio/tcp_connection_ctx_base.hpp