RESTinio
Loading...
Searching...
No Matches
restinio::impl::socket_supplier_t< tls_socket_t > Class Reference

A custom socket storage for tls_socket_t. More...

#include <tls.hpp>

Protected Member Functions

template<typename Settings>
 socket_supplier_t (Settings &settings, asio_ns::io_context &io_context)
 
virtual ~socket_supplier_t ()=default
 
tls_socket_tsocket (std::size_t idx)
 
auto move_socket (std::size_t idx)
 
auto concurrent_accept_sockets_count () const
 The number of sockets that can be used for cuncurrent accept operations.
 
 socket_supplier_t (Settings &settings, asio_ns::io_context &io_context)
 
tls_socket_tsocket (std::size_t idx)
 Get the reference to socket.
 
tls_socket_t move_socket (std::size_t idx)
 Extract the socket via move.
 
auto concurrent_accept_sockets_count () const noexcept
 The number of sockets that can be used for cuncurrent accept operations.
 

Private Attributes

std::shared_ptr< asio_ns::ssl::context > m_tls_context
 
asio_ns::io_context & m_io_context
 
std::vector< tls_socket_tm_sockets
 
asio_ns::io_context & m_io_context
 io_context for sockets to run on.
 
std::vector< tls_socket_tm_sockets
 A temporary socket for receiving new connections.
 

Detailed Description

A custom socket storage for tls_socket_t.

Definition at line 337 of file tls.hpp.

Constructor & Destructor Documentation

◆ socket_supplier_t() [1/2]

template<typename Settings>
restinio::impl::socket_supplier_t< tls_socket_t >::socket_supplier_t ( Settings & settings,
asio_ns::io_context & io_context )
inlineprotected

Definition at line 341 of file tls.hpp.

◆ ~socket_supplier_t()

virtual restinio::impl::socket_supplier_t< tls_socket_t >::~socket_supplier_t ( )
protectedvirtualdefault

◆ socket_supplier_t() [2/2]

restinio::impl::socket_supplier_t< tls_socket_t >::socket_supplier_t ( Settings & settings,
asio_ns::io_context & io_context )
inlineprotected
Parameters
settingsServer settings.
io_contextA context the server runs on.

Definition at line 45 of file acceptor.hpp.

Member Function Documentation

◆ concurrent_accept_sockets_count() [1/2]

auto restinio::impl::socket_supplier_t< tls_socket_t >::concurrent_accept_sockets_count ( ) const
inlineprotected

The number of sockets that can be used for cuncurrent accept operations.

Definition at line 378 of file tls.hpp.

◆ concurrent_accept_sockets_count() [2/2]

auto restinio::impl::socket_supplier_t< tls_socket_t >::concurrent_accept_sockets_count ( ) const
inlineprotectednoexcept

The number of sockets that can be used for cuncurrent accept operations.

Definition at line 85 of file acceptor.hpp.

◆ move_socket() [1/2]

tls_socket_t restinio::impl::socket_supplier_t< tls_socket_t >::move_socket ( std::size_t idx)
inlineprotected

Extract the socket via move.

Parameters
idxIndex of a socket in the pool.

Definition at line 75 of file acceptor.hpp.

◆ move_socket() [2/2]

auto restinio::impl::socket_supplier_t< tls_socket_t >::move_socket ( std::size_t idx)
inlineprotected
Parameters
idxIndex of a socket in the pool.

Definition at line 366 of file tls.hpp.

◆ socket() [1/2]

tls_socket_t & restinio::impl::socket_supplier_t< tls_socket_t >::socket ( std::size_t idx)
inlineprotected

Get the reference to socket.

Parameters
idxIndex of a socket in the pool.

Definition at line 66 of file acceptor.hpp.

◆ socket() [2/2]

tls_socket_t & restinio::impl::socket_supplier_t< tls_socket_t >::socket ( std::size_t idx)
inlineprotected
Parameters
idxIndex of a socket in the pool.

Definition at line 358 of file tls.hpp.

Member Data Documentation

◆ m_io_context [1/2]

asio_ns::io_context& restinio::impl::socket_supplier_t< tls_socket_t >::m_io_context
private

io_context for sockets to run on.

Definition at line 92 of file acceptor.hpp.

◆ m_io_context [2/2]

asio_ns::io_context& restinio::impl::socket_supplier_t< tls_socket_t >::m_io_context
private

Definition at line 385 of file tls.hpp.

◆ m_sockets [1/2]

std::vector< tls_socket_t > restinio::impl::socket_supplier_t< tls_socket_t >::m_sockets
private

A temporary socket for receiving new connections.

Note
Must never be empty.

Definition at line 96 of file acceptor.hpp.

◆ m_sockets [2/2]

std::vector< tls_socket_t > restinio::impl::socket_supplier_t< tls_socket_t >::m_sockets
private

Definition at line 386 of file tls.hpp.

◆ m_tls_context

std::shared_ptr< asio_ns::ssl::context > restinio::impl::socket_supplier_t< tls_socket_t >::m_tls_context
private

Definition at line 384 of file tls.hpp.


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