RESTinio
Loading...
Searching...
No Matches
restinio::connection_state::notice_t Class Reference

An object with info about connection to be passed to state listener. More...

#include <connection_state_listener.hpp>

Public Member Functions

 notice_t (connection_id_t conn_id, endpoint_t remote_endpoint, cause_t cause)
 Initializing constructor.
connection_id_t connection_id () const noexcept
 Get the connection id.
endpoint_t remote_endpoint () const noexcept
 Get the remote endpoint for the connection.
cause_t cause () const noexcept
 Get the cause for the notification.

Private Attributes

connection_id_t m_conn_id
endpoint_t m_remote_endpoint
cause_t m_cause

Detailed Description

An object with info about connection to be passed to state listener.

That object contains available information of the connection for that state listener is called.

NOTE. Content of this type can be changed in future versions of RESTinio.

Since
v.0.5.1
Examples
sample/connection_state/main.cpp, and sample/ip_blocker/main.cpp.

Definition at line 221 of file connection_state_listener.hpp.

Constructor & Destructor Documentation

◆ notice_t()

restinio::connection_state::notice_t::notice_t ( connection_id_t conn_id,
endpoint_t remote_endpoint,
cause_t cause )
inline

Initializing constructor.

Definition at line 229 of file connection_state_listener.hpp.

Member Function Documentation

◆ cause()

cause_t restinio::connection_state::notice_t::cause ( ) const
inlinenodiscardnoexcept

Get the cause for the notification.

Attention
Since v.0.6.0 the type cause_t is a variant, not a simple enumeration as in v.0.5.
Examples
sample/connection_state/main.cpp, sample/ip_blocker/main.cpp, and sample/tls_inspector/main.cpp.

Definition at line 256 of file connection_state_listener.hpp.

◆ connection_id()

connection_id_t restinio::connection_state::notice_t::connection_id ( ) const
inlinenodiscardnoexcept

◆ remote_endpoint()

endpoint_t restinio::connection_state::notice_t::remote_endpoint ( ) const
inlinenodiscardnoexcept

Get the remote endpoint for the connection.

Examples
sample/connection_state/main.cpp, and sample/ip_blocker/main.cpp.

Definition at line 246 of file connection_state_listener.hpp.

Member Data Documentation

◆ m_cause

cause_t restinio::connection_state::notice_t::m_cause
private

Definition at line 225 of file connection_state_listener.hpp.

◆ m_conn_id

connection_id_t restinio::connection_state::notice_t::m_conn_id
private

Definition at line 223 of file connection_state_listener.hpp.

◆ m_remote_endpoint

endpoint_t restinio::connection_state::notice_t::m_remote_endpoint
private

Definition at line 224 of file connection_state_listener.hpp.


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