RESTinio
Public Member Functions | Private Attributes | List of all members
restinio::run_on_thread_pool_settings_t< Traits > Class Template Referencefinal

Settings for the case when http_server must be run on the context of the current thread. More...

#include <http_server_run.hpp>

Inheritance diagram for restinio::run_on_thread_pool_settings_t< Traits >:
restinio::basic_server_settings_t< run_on_thread_pool_settings_t< Traits >, Traits > restinio::socket_type_dependent_settings_t< run_on_thread_pool_settings_t< Traits >, Traits::stream_socket_t > restinio::connection_state_listener_holder_t< Traits::connection_state_listener_t > restinio::ip_blocker_holder_t< Traits::ip_blocker_t >

Public Member Functions

 run_on_thread_pool_settings_t (std::size_t pool_size)
 Constructor. More...
 
std::size_t pool_size () const
 Get the pool size. More...
 
- Public Member Functions inherited from restinio::basic_server_settings_t< run_on_thread_pool_settings_t< Traits >, Traits >
 basic_server_settings_t (std::uint16_t port=8080, asio_ns::ip::tcp protocol=asio_ns::ip::tcp::v4())
 
run_on_thread_pool_settings_t< Traits > & buffer_size (std::size_t s) &
 Size of buffer for io operations. More...
 
run_on_thread_pool_settings_t< Traits > && buffer_size (std::size_t s) &&
 
std::size_t buffer_size () const
 
run_on_thread_pool_settings_t< Traits > & connection_state_listener (std::shared_ptr< typename Traits::connection_state_listener_t > listener) &
 Setter for connection state listener. More...
 
run_on_thread_pool_settings_t< Traits > && connection_state_listener (std::shared_ptr< typename Traits::connection_state_listener_t > listener) &&
 Setter for connection state listener. More...
 
const std::shared_ptr< typename Traits::connection_state_listener_t > & connection_state_listener () const noexcept
 Get reference to connection state listener. More...
 
void ensure_valid_connection_state_listener ()
 Internal method for checking presence of state listener object. More...
 
run_on_thread_pool_settings_t< Traits > & ip_blocker (std::shared_ptr< typename Traits::ip_blocker_t > blocker) &
 Setter for IP-blocker. More...
 
run_on_thread_pool_settings_t< Traits > && ip_blocker (std::shared_ptr< typename Traits::ip_blocker_t > blocker) &&
 Setter for IP-blocker. More...
 
const std::shared_ptr< typename Traits::ip_blocker_t > & ip_blocker () const noexcept
 Get reference to IP-blocker. More...
 
void ensure_valid_ip_blocker ()
 Internal method for checking presence of IP-blocker object. More...
 
run_on_thread_pool_settings_t< Traits > & port (std::uint16_t p) &
 Server endpoint. More...
 
run_on_thread_pool_settings_t< Traits > && port (std::uint16_t p) &&
 
std::uint16_t port () const
 
run_on_thread_pool_settings_t< Traits > & protocol (asio_ns::ip::tcp p) &
 
run_on_thread_pool_settings_t< Traits > && protocol (asio_ns::ip::tcp p) &&
 
asio_ns::ip::tcp protocol () const
 
run_on_thread_pool_settings_t< Traits > & address (std::string addr) &
 
run_on_thread_pool_settings_t< Traits > && address (std::string addr) &&
 
const std::string & address () const
 
run_on_thread_pool_settings_t< Traits > & read_next_http_message_timelimit (std::chrono::steady_clock::duration d) &
 } More...
 
run_on_thread_pool_settings_t< Traits > && read_next_http_message_timelimit (std::chrono::steady_clock::duration d) &&
 
std::chrono::steady_clock::duration read_next_http_message_timelimit () const
 
run_on_thread_pool_settings_t< Traits > & write_http_response_timelimit (std::chrono::steady_clock::duration d) &
 A period of time wait for response to be written to socket. More...
 
run_on_thread_pool_settings_t< Traits > && write_http_response_timelimit (std::chrono::steady_clock::duration d) &&
 
std::chrono::steady_clock::duration write_http_response_timelimit () const
 
run_on_thread_pool_settings_t< Traits > & handle_request_timeout (std::chrono::steady_clock::duration d) &
 A period of time that is given for a handler to create response. More...
 
run_on_thread_pool_settings_t< Traits > && handle_request_timeout (std::chrono::steady_clock::duration d) &&
 
std::chrono::steady_clock::duration handle_request_timeout () const
 
run_on_thread_pool_settings_t< Traits > & max_pipelined_requests (std::size_t mpr) &
 Max pipelined requests able to receive on single connection. More...
 
run_on_thread_pool_settings_t< Traits > && max_pipelined_requests (std::size_t mpr) &&
 
std::size_t max_pipelined_requests () const
 
run_on_thread_pool_settings_t< Traits > & acceptor_options_setter (acceptor_options_setter_t aos) &
 Acceptor options setter. More...
 
run_on_thread_pool_settings_t< Traits > && acceptor_options_setter (acceptor_options_setter_t aos) &&
 
std::unique_ptr< acceptor_options_setter_tacceptor_options_setter ()
 
run_on_thread_pool_settings_t< Traits > & socket_options_setter (socket_options_setter_t sos) &
 Socket options setter. More...
 
run_on_thread_pool_settings_t< Traits > && socket_options_setter (socket_options_setter_t sos) &&
 
std::unique_ptr< socket_options_setter_tsocket_options_setter ()
 
run_on_thread_pool_settings_t< Traits > & concurrent_accepts_count (std::size_t n) &
 Max number of running concurrent accepts. More...
 
run_on_thread_pool_settings_t< Traits > && concurrent_accepts_count (std::size_t n) &&
 
std::size_t concurrent_accepts_count () const
 
run_on_thread_pool_settings_t< Traits > & separate_accept_and_create_connect (bool do_separate) &
 Do separate an accept operation and connection instantiation. More...
 
run_on_thread_pool_settings_t< Traits > && separate_accept_and_create_connect (bool do_separate) &&
 
bool separate_accept_and_create_connect () const
 
run_on_thread_pool_settings_t< Traits > & cleanup_func (Func &&func) &
 Cleanup function. More...
 
run_on_thread_pool_settings_t< Traits > && cleanup_func (Func &&func) &&
 
cleanup_functor_t giveaway_cleanup_func ()
 
run_on_thread_pool_settings_t< Traits > & request_handler (std::unique_ptr< request_handler_t > handler) &
 
run_on_thread_pool_settings_t< Traits > & request_handler (Params &&... params) &
 
run_on_thread_pool_settings_t< Traits > && request_handler (Params &&... params) &&
 
std::unique_ptr< request_handler_trequest_handler ()
 
run_on_thread_pool_settings_t< Traits > & timer_manager (Params &&... params) &
 
run_on_thread_pool_settings_t< Traits > && timer_manager (Params &&... params) &&
 
std::unique_ptr< timer_factory_ttimer_factory ()
 
run_on_thread_pool_settings_t< Traits > & logger (Params &&... params) &
 
run_on_thread_pool_settings_t< Traits > && logger (Params &&... params) &&
 
std::unique_ptr< logger_tlogger ()
 
- Public Member Functions inherited from restinio::socket_type_dependent_settings_t< run_on_thread_pool_settings_t< Traits >, Traits::stream_socket_t >
 socket_type_dependent_settings_t ()=default
 
 socket_type_dependent_settings_t (const socket_type_dependent_settings_t &)=default
 
 socket_type_dependent_settings_t (socket_type_dependent_settings_t &&)=default
 
socket_type_dependent_settings_toperator= (const socket_type_dependent_settings_t &)=default
 
socket_type_dependent_settings_toperator= (socket_type_dependent_settings_t &&)=delete
 

Private Attributes

std::size_t m_pool_size
 Size of the pool. More...
 

Additional Inherited Members

- Public Types inherited from restinio::basic_server_settings_t< run_on_thread_pool_settings_t< Traits >, Traits >
using request_handler_t = typename Traits::request_handler_t
 Request handler. More...
 
using timer_manager_t = typename Traits::timer_manager_t
 Timers manager. More...
 
using timer_factory_t = typename timer_manager_t::factory_t
 
using logger_t = typename Traits::logger_t
 Logger. More...
 
- Protected Member Functions inherited from restinio::socket_type_dependent_settings_t< run_on_thread_pool_settings_t< Traits >, Traits::stream_socket_t >
 ~socket_type_dependent_settings_t ()=default
 
- Protected Member Functions inherited from restinio::connection_state_listener_holder_t< Traits::connection_state_listener_t >
void check_valid_connection_state_listener_pointer () const
 Checks that pointer to state listener is not null. More...
 
- Protected Member Functions inherited from restinio::ip_blocker_holder_t< Traits::ip_blocker_t >
void check_valid_ip_blocker_pointer () const
 Checks that pointer to IP-blocker is not null. More...
 
- Protected Attributes inherited from restinio::connection_state_listener_holder_t< Traits::connection_state_listener_t >
std::shared_ptr< Traits::connection_state_listener_t > m_connection_state_listener
 
- Protected Attributes inherited from restinio::ip_blocker_holder_t< Traits::ip_blocker_t >
std::shared_ptr< Traits::ip_blocker_t > m_ip_blocker
 
- Static Protected Attributes inherited from restinio::connection_state_listener_holder_t< Traits::connection_state_listener_t >
static constexpr bool has_actual_connection_state_listener
 
- Static Protected Attributes inherited from restinio::ip_blocker_holder_t< Traits::ip_blocker_t >
static constexpr bool has_actual_ip_blocker
 

Detailed Description

template<typename Traits>
class restinio::run_on_thread_pool_settings_t< Traits >

Settings for the case when http_server must be run on the context of the current thread.

Note
Shouldn't be used directly. Only as result of on_thread_pool() function as parameter for run().

Definition at line 137 of file http_server_run.hpp.

Constructor & Destructor Documentation

◆ run_on_thread_pool_settings_t()

template<typename Traits >
restinio::run_on_thread_pool_settings_t< Traits >::run_on_thread_pool_settings_t ( std::size_t  pool_size)
inline

Constructor.

Parameters
pool_sizeSize of the pool.

Definition at line 147 of file http_server_run.hpp.

Member Function Documentation

◆ pool_size()

template<typename Traits >
std::size_t restinio::run_on_thread_pool_settings_t< Traits >::pool_size ( ) const
inline

Get the pool size.

Definition at line 155 of file http_server_run.hpp.

Member Data Documentation

◆ m_pool_size

template<typename Traits >
std::size_t restinio::run_on_thread_pool_settings_t< Traits >::m_pool_size
private

Size of the pool.

Definition at line 143 of file http_server_run.hpp.


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