restinio::socket_options_t Class Reference

An adapter for setting acceptor options before running server. More...

`#include <settings.hpp>`

## Public Member Functions

| socket_options_t (asio_ns::basic_socket< asio_ns::ip::tcp > &socket)
template<typename Option >
void | set_option (const Option &option)
| API for setting/getting options. More...
template<typename Option >
void | set_option (const Option &option, asio_ns::error_code &ec)
template<typename Option >
void | get_option (Option &option)
template<typename Option >
void | get_option (Option &option, asio_ns::error_code &ec)

## Private Attributes

asio_ns::basic_socket< asio_ns::ip::tcp > & | m_socket
| A reference on the most base class with interface of setting options. More...

## Detailed Description

An adapter for setting acceptor options before running server.

Class hides a socket object and opens only set/get options API. It is used as an argument for a user defined function-object that can set custom options for socket.

Definition at line 248 of file settings.hpp.

## Constructor & Destructor Documentation

## socket_options_t()

restinio::socket_options_t::socket_options_t | ( | asio_ns::basic_socket< asio_ns::ip::tcp > & | socket | ) |

inline

Parameters

  socket | A reference on the most base class with interface of setting options.

Definition at line 251 of file settings.hpp.

## Member Function Documentation

## get_option() [1/2]

template<typename Option >

void restinio::socket_options_t::get_option | ( | Option & | option | ) |

inline

Definition at line 275 of file settings.hpp.

## get_option() [2/2]

template<typename Option >

void restinio::socket_options_t::get_option | ( | Option & | option,
|  | asio_ns::error_code & | ec
| ) |  |

inline

Definition at line 282 of file settings.hpp.

## set_option() [1/2]

template<typename Option >

void restinio::socket_options_t::set_option | ( | const Option & | option | ) |

inline

API for setting/getting options.

Definition at line 261 of file settings.hpp.

## set_option() [2/2]

template<typename Option >

void restinio::socket_options_t::set_option | ( | const Option & | option,
|  | asio_ns::error_code & | ec
| ) |  |

inline

Definition at line 268 of file settings.hpp.

## Member Data Documentation

## m_socket

asio_ns::basic_socket< asio_ns::ip::tcp >& restinio::socket_options_t::m_socket

private

A reference on the most base class with interface of setting options.

Definition at line 290 of file settings.hpp.

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

- restinio/settings.hpp