A TCP acceptor session with TLS support continuously waiting for incoming connections.
More...
A TCP acceptor session with TLS support continuously waiting for incoming connections.
The session implements the asio::SocketCreationSession class template and signals asio::Socket interfaces for incoming encrypted connections. Synopsis:
auto context = std::make_shared<asio::Context>();
auto tls_context = std::make_shared<asio::TlsContext>(asio::TlsContext::tlsv12_server);
tls_context->set_options(asio::TlsContext::default_workarounds | asio::TlsContext::no_sslv2 | asio::TlsContext::single_dh_use);
tls_context->use_certificate_chain(boost::asio::buffer(
cert.data(),
cert.size()));
tls_context->use_private_key(boost::asio::buffer(
pk.data(),
pk.size()), asio::TlsContext::pem);
session->observeConnectionEstablished([](std::unique_ptr<asio::Socket>& socket) {
});
context->run();
static std::shared_ptr< TlsAcceptorSession > create(Arguments &&... arguments)
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Definition at line 39 of file TlsAcceptorSession.h.