RESTinio

Protected Member Functions | Private Attributes | List of all members
restinio::impl::socket_supplier_t< Socket > Class Template Reference

`#include <acceptor.hpp>`

## Protected Member Functions
template<typename Settings >
| socket_supplier_t (Settings &settings, asio_ns::io_context &io_context)
Socket & | socket (std::size_t idx)
| Get the reference to socket. More...
Socket | move_socket (std::size_t idx)
| Extract the socket via move. More...
auto | concurrent_accept_sockets_count () const noexcept
| The number of sockets that can be used for cuncurrent accept operations. More...

## Private Attributes
asio_ns::io_context & | m_io_context
| io_context for sockets to run on. More...
std::vector< Socket > | m_sockets
| A temporary socket for receiving new connections. More...

## Detailed Description

template<typename Socket>
class restinio::impl::socket_supplier_t< Socket >

Definition at line 41 of file acceptor.hpp.

## Constructor & Destructor Documentation

## ◆ socket_supplier_t()

template<typename Socket >
template<typename Settings >

restinio::impl::socket_supplier_t< Socket >::socket_supplier_t | ( | Settings & | settings,
|  | asio_ns::io_context & | io_context
| ) |  |
| inline protected

Parameters

  settings | Server settings.
  io_context | A context the server runs on.

Definition at line 45 of file acceptor.hpp.

## Member Function Documentation

## ◆ concurrent_accept_sockets_count()

template<typename Socket >

auto restinio::impl::socket_supplier_t< Socket >::concurrent_accept_sockets_count | ( |  | ) | const
| inline protected noexcept

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

Definition at line 85 of file acceptor.hpp.

## ◆ move_socket()

template<typename Socket >

Socket restinio::impl::socket_supplier_t< Socket >::move_socket | ( | std::size_t | idx | ) |
| inline protected

Extract the socket via move.

Parameters

  idx | Index of a socket in the pool.

Definition at line 75 of file acceptor.hpp.

## ◆ socket()

template<typename Socket >

Socket & restinio::impl::socket_supplier_t< Socket >::socket | ( | std::size_t | idx | ) |
| inline protected

Get the reference to socket.

Parameters

  idx | Index of a socket in the pool.

Definition at line 66 of file acceptor.hpp.

## Member Data Documentation

## ◆ m_io_context

template<typename Socket >

asio_ns::io_context& restinio::impl::socket_supplier_t< Socket >::m_io_context
| private

io_context for sockets to run on.

Definition at line 92 of file acceptor.hpp.

## ◆ m_sockets

template<typename Socket >

std::vector< Socket > restinio::impl::socket_supplier_t< Socket >::m_sockets
| private

A temporary socket for receiving new connections.

Note
  Must never be empty.

Definition at line 96 of file acceptor.hpp.

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

- restinio/impl/acceptor.hpp