22namespace connection_state
92 template<
typename Lambda >
128 template<
typename Lambda >
169 template<
typename Lambda,
typename T >
Type of object that tells that new connection has been accepted.
accepted_t(tls_socket_t *tls_socket)
decltype(auto) inspect_tls_or_throw(Lambda &&lambda) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
RESTINIO_NODISCARD bool is_tls_connection() const noexcept
Checks if the accepted connection is a TLS-connection.
T inspect_tls_or_default(Lambda &&lambda, T &&default_value) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
tls_socket_t * m_tls_socket
An optional pointer to TLS-related connection.
void try_inspect_tls(Lambda &&lambda) const
Calls the specified lambda-function if the accepted connection is a TLS-connection.
Type of object that tells that the connection has been closed.
An object with info about connection to be passed to state listener.
connection_id_t m_conn_id
endpoint_t m_remote_endpoint
RESTINIO_NODISCARD cause_t cause() const noexcept
Get the cause for the notification.
RESTINIO_NODISCARD connection_id_t connection_id() const noexcept
Get the connection id.
RESTINIO_NODISCARD endpoint_t remote_endpoint() const noexcept
Get the remote endpoint for the connection.
notice_t(connection_id_t conn_id, endpoint_t remote_endpoint, cause_t cause)
Initializing constructor.
Type of object that tells that the connection has been upgraded to WebSocket.
Socket adapter for asio::ssl::stream< asio::ip::tcp::socket >.
Detection of compiler version and absence of various features.
#define RESTINIO_NODISCARD
asio_ns::ip::tcp::endpoint endpoint_t
An alias for endpoint type from Asio.
std::uint64_t connection_id_t
Type for ID of connection.
The default no-op state listener.
Forward declarations for TLS-related things.