93 template<
typename Lambda >
129 template<
typename Lambda >
170 template<
typename Lambda,
typename T >
209using cause_t = std::variant< accepted_t, closed_t, upgraded_to_websocket_t >;
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.
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.
bool is_tls_connection() const noexcept
Checks if the accepted connection is a TLS-connection.
Type of object that tells that the connection has been closed.
endpoint_t remote_endpoint() const noexcept
Get the remote endpoint for the connection.
connection_id_t m_conn_id
endpoint_t m_remote_endpoint
connection_id_t connection_id() const noexcept
Get the connection id.
notice_t(connection_id_t conn_id, endpoint_t remote_endpoint, cause_t cause)
Initializing constructor.
cause_t cause() const noexcept
Get the cause for the notification.
Type of object that tells that the connection has been upgraded to WebSocket.
Detection of compiler version and absence of various features.
std::variant< accepted_t, closed_t, upgraded_to_websocket_t > cause_t
A type for the representation of the current state of a connection.
asio_ns::ip::tcp::endpoint endpoint_t
An alias for endpoint type from Asio.
impl::tls_socket_t tls_socket_t
A public alias for the actual implementation of TLS-socket.
std::uint64_t connection_id_t
Type for ID of connection.
The default no-op state listener.
Forward declarations for TLS-related things.