1#if defined(HAVE_CONFIG_H)
5#ifndef TLS_CONNECTION_HXX
6#define TLS_CONNECTION_HXX
11#include <asio/ssl.hpp>
17class ConnectionManager;
19typedef asio::ssl::stream<asio::ip::tcp::socket>
ssl_socket;
36 ssl_socket::lowest_layer_type&
socket();
53 virtual void onReceiveSuccess(
const asio::ip::address& address,
unsigned short port,
const std::shared_ptr<DataBuffer>& data);
Manages open connections so that they may be cleanly stopped when the server needs to shut down,...
The common handler for all incoming requests.
Represents a single connection from a client.
virtual void onServerHandshakeFailure(const asio::error_code &e)
ssl_socket::lowest_layer_type & socket()
Get the socket associated with the connection.
virtual void onSendSuccess()
Handle completion of a send operation.
TlsConnection(TlsConnection &&)=delete
TlsConnection & operator=(TlsConnection &&)=delete
virtual void stop()
Stop all asynchronous operations associated with the connection.
virtual void onServerHandshakeSuccess()
Handle completion of a handshake operation.
TlsConnection & operator=(const TlsConnection &)=delete
TlsConnection(const TlsConnection &)=delete
unsigned short mLocalPort
virtual void onReceiveFailure(const asio::error_code &e)
TurnAllocationManager mTurnAllocationManager
Manages turn allocations.
RequestHandler & mRequestHandler
The handler used to process the incoming request.
virtual void onReceiveSuccess(const asio::ip::address &address, unsigned short port, const std::shared_ptr< DataBuffer > &data)
Handle completion of a receive operation.
asio::ip::address mLocalAddress
virtual void close()
Override close fn in AsyncTcpSocketBase so that we can remove ourselves from connection manager.
ConnectionManager & mConnectionManager
The manager for this connection.
virtual void start()
Start the first asynchronous operation for the connection.
virtual void onSendFailure(const asio::error_code &e)
asio::ssl::stream< asio::ip::tcp::socket > ssl_socket