RESTinio
|
Settings for the case when http_server must be run on the context of the current thread. More...
#include <http_server_run.hpp>
Public Member Functions | |
run_on_thread_pool_settings_t (std::size_t pool_size) | |
Constructor. | |
std::size_t | pool_size () const |
Get the pool size. | |
Public Member Functions inherited from restinio::basic_server_settings_t< run_on_thread_pool_settings_t< Traits >, Traits > | |
std::size_t | max_parallel_connections () const noexcept |
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. | |
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. | |
void | ensure_valid_connection_state_listener () |
Internal method for checking presence of state listener object. | |
run_on_thread_pool_settings_t< Traits > & | ip_blocker (std::shared_ptr< typename Traits::ip_blocker_t > blocker) & |
Setter for IP-blocker. | |
void | ensure_valid_ip_blocker () |
Internal method for checking presence of IP-blocker object. | |
run_on_thread_pool_settings_t< Traits > & | acceptor_post_bind_hook (acceptor_post_bind_hook_t hook) & |
A setter for post-bind callback. | |
acceptor_post_bind_hook_t | giveaway_acceptor_post_bind_hook () |
A getter for post-bind callback. | |
const incoming_http_msg_limits_t & | incoming_http_msg_limits () const noexcept |
Getter of optional limits for incoming HTTP messages. | |
run_on_thread_pool_settings_t< Traits > & | port (std::uint16_t p) & |
Server endpoint. | |
run_on_thread_pool_settings_t< Traits > & | protocol (asio_ns::ip::tcp p) & |
run_on_thread_pool_settings_t< Traits > & | address (std::string addr) & |
run_on_thread_pool_settings_t< Traits > & | read_next_http_message_timelimit (std::chrono::steady_clock::duration d) & |
} | |
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. | |
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. | |
run_on_thread_pool_settings_t< Traits > & | max_pipelined_requests (std::size_t mpr) & |
Max pipelined requests able to receive on single connection. | |
run_on_thread_pool_settings_t< Traits > & | acceptor_options_setter (acceptor_options_setter_t aos) & |
run_on_thread_pool_settings_t< Traits > & | socket_options_setter (socket_options_setter_t sos) & |
run_on_thread_pool_settings_t< Traits > & | concurrent_accepts_count (std::size_t n) & |
Max number of running concurrent accepts. | |
run_on_thread_pool_settings_t< Traits > & | separate_accept_and_create_connect (bool do_separate) &noexcept |
Do separate an accept operation and connection instantiation. | |
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 > & | timer_manager (Params &&... params) & |
Creates a factory object that will be used for creation of an actual timer_manager instance. | |
std::unique_ptr< timer_factory_t > | timer_factory () |
run_on_thread_pool_settings_t< Traits > & | logger (Params &&... params) & |
run_on_thread_pool_settings_t< Traits > & | extra_data_factory (extra_data_factory_handle_t factory) & |
Setter for extra-data-factory. | |
extra_data_factory_handle_t | giveaway_extra_data_factory () const noexcept |
Extractor for extra-data-factory. | |
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 () noexcept=default | |
socket_type_dependent_settings_t & | operator= (const socket_type_dependent_settings_t &) noexcept=default |
Private Attributes | |
std::size_t | m_pool_size |
Size of the pool. |
Settings for the case when http_server must be run on the context of the current thread.
Definition at line 137 of file http_server_run.hpp.
|
inline |
Constructor.
pool_size | Size of the pool. |
Definition at line 147 of file http_server_run.hpp.
|
inline |
Get the pool size.
Definition at line 155 of file http_server_run.hpp.
|
private |
Size of the pool.
Definition at line 143 of file http_server_run.hpp.