RESTinio
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
restinio::impl::connection_settings_t< Traits > Struct Template Referencefinal

Parameters shared between connections. More...

#include <connection_settings.hpp>

Inheritance diagram for restinio::impl::connection_settings_t< Traits >:
restinio::impl::connection_settings_details::state_listener_holder_t< Traits::connection_state_listener_t >

Public Types

using timer_manager_t = typename Traits::timer_manager_t
 
using timer_manager_handle_t = std::shared_ptr< timer_manager_t >
 
using request_handler_t = typename Traits::request_handler_t
 
using logger_t = typename Traits::logger_t
 
using connection_state_listener_holder_t = connection_settings_details::state_listener_holder_t< typename Traits::connection_state_listener_t >
 

Public Member Functions

 connection_settings_t (const connection_settings_t &)=delete
 
 connection_settings_t (const connection_settings_t &&)=delete
 
connection_settings_toperator= (const connection_settings_t &)=delete
 
connection_settings_toperator= (connection_settings_t &&)=delete
 
template<typename Settings >
 connection_settings_t (Settings &&settings, http_parser_settings parser_settings, timer_manager_handle_t timer_manager)
 
auto create_timer_guard ()
 Create new timer guard. More...
 
- Public Member Functions inherited from restinio::impl::connection_settings_details::state_listener_holder_t< Traits::connection_state_listener_t >
 state_listener_holder_t (const Settings &settings)
 
void call_state_listener (Lambda &&lambda) const noexcept
 

Public Attributes

std::unique_ptr< request_handler_tm_request_handler
 Request handler factory. More...
 
const http_parser_settings m_parser_settings
 Parser settings. More...
 
std::size_t m_buffer_size
 Params from server_settings_t. More...
 
std::chrono::steady_clock::duration m_read_next_http_message_timelimit { std::chrono::seconds( 60 ) }
 
std::chrono::steady_clock::duration m_write_http_response_timelimit { std::chrono::seconds( 5 ) }
 
std::chrono::steady_clock::duration m_handle_request_timeout { std::chrono::seconds( 10 ) }
 
std::size_t m_max_pipelined_requests
 
const std::unique_ptr< logger_tm_logger
 
- Public Attributes inherited from restinio::impl::connection_settings_details::state_listener_holder_t< Traits::connection_state_listener_t >
std::shared_ptr< Traits::connection_state_listener_t > m_connection_state_listener
 

Private Attributes

timer_manager_handle_t m_timer_manager
 Timer factory for timout guards. More...
 

Detailed Description

template<typename Traits>
struct restinio::impl::connection_settings_t< Traits >

Parameters shared between connections.

Each connection has access to common params and server-agent throught this object.

Definition at line 88 of file connection_settings.hpp.

Member Typedef Documentation

◆ connection_state_listener_holder_t

template<typename Traits >
using restinio::impl::connection_settings_t< Traits >::connection_state_listener_holder_t = connection_settings_details::state_listener_holder_t< typename Traits::connection_state_listener_t >

Definition at line 100 of file connection_settings.hpp.

◆ logger_t

template<typename Traits >
using restinio::impl::connection_settings_t< Traits >::logger_t = typename Traits::logger_t

Definition at line 96 of file connection_settings.hpp.

◆ request_handler_t

template<typename Traits >
using restinio::impl::connection_settings_t< Traits >::request_handler_t = typename Traits::request_handler_t

Definition at line 95 of file connection_settings.hpp.

◆ timer_manager_handle_t

template<typename Traits >
using restinio::impl::connection_settings_t< Traits >::timer_manager_handle_t = std::shared_ptr< timer_manager_t >

Definition at line 94 of file connection_settings.hpp.

◆ timer_manager_t

template<typename Traits >
using restinio::impl::connection_settings_t< Traits >::timer_manager_t = typename Traits::timer_manager_t

Definition at line 93 of file connection_settings.hpp.

Constructor & Destructor Documentation

◆ connection_settings_t() [1/3]

template<typename Traits >
restinio::impl::connection_settings_t< Traits >::connection_settings_t ( const connection_settings_t< Traits > &  )
delete

◆ connection_settings_t() [2/3]

template<typename Traits >
restinio::impl::connection_settings_t< Traits >::connection_settings_t ( const connection_settings_t< Traits > &&  )
delete

◆ connection_settings_t() [3/3]

template<typename Traits >
template<typename Settings >
restinio::impl::connection_settings_t< Traits >::connection_settings_t ( Settings &&  settings,
http_parser_settings  parser_settings,
timer_manager_handle_t  timer_manager 
)
inline

Definition at line 108 of file connection_settings.hpp.

Member Function Documentation

◆ create_timer_guard()

template<typename Traits >
auto restinio::impl::connection_settings_t< Traits >::create_timer_guard ( )
inline

Create new timer guard.

Definition at line 159 of file connection_settings.hpp.

◆ operator=() [1/2]

template<typename Traits >
connection_settings_t& restinio::impl::connection_settings_t< Traits >::operator= ( const connection_settings_t< Traits > &  )
delete

◆ operator=() [2/2]

template<typename Traits >
connection_settings_t& restinio::impl::connection_settings_t< Traits >::operator= ( connection_settings_t< Traits > &&  )
delete

Member Data Documentation

◆ m_buffer_size

template<typename Traits >
std::size_t restinio::impl::connection_settings_t< Traits >::m_buffer_size

Params from server_settings_t.

Definition at line 141 of file connection_settings.hpp.

◆ m_handle_request_timeout

template<typename Traits >
std::chrono::steady_clock::duration restinio::impl::connection_settings_t< Traits >::m_handle_request_timeout { std::chrono::seconds( 10 ) }

Definition at line 150 of file connection_settings.hpp.

◆ m_logger

template<typename Traits >
const std::unique_ptr< logger_t > restinio::impl::connection_settings_t< Traits >::m_logger

Definition at line 154 of file connection_settings.hpp.

◆ m_max_pipelined_requests

template<typename Traits >
std::size_t restinio::impl::connection_settings_t< Traits >::m_max_pipelined_requests

Definition at line 152 of file connection_settings.hpp.

◆ m_parser_settings

template<typename Traits >
const http_parser_settings restinio::impl::connection_settings_t< Traits >::m_parser_settings

Parser settings.

Parsing settings are common for each connection.

Definition at line 137 of file connection_settings.hpp.

◆ m_read_next_http_message_timelimit

template<typename Traits >
std::chrono::steady_clock::duration restinio::impl::connection_settings_t< Traits >::m_read_next_http_message_timelimit { std::chrono::seconds( 60 ) }

Definition at line 144 of file connection_settings.hpp.

◆ m_request_handler

template<typename Traits >
std::unique_ptr< request_handler_t > restinio::impl::connection_settings_t< Traits >::m_request_handler

Request handler factory.

Definition at line 131 of file connection_settings.hpp.

◆ m_timer_manager

template<typename Traits >
timer_manager_handle_t restinio::impl::connection_settings_t< Traits >::m_timer_manager
private

Timer factory for timout guards.

Definition at line 167 of file connection_settings.hpp.

◆ m_write_http_response_timelimit

template<typename Traits >
std::chrono::steady_clock::duration restinio::impl::connection_settings_t< Traits >::m_write_http_response_timelimit { std::chrono::seconds( 5 ) }

Definition at line 147 of file connection_settings.hpp.


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