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. | |
![]() | |
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 > && | 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. | |
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. | |
const std::shared_ptr< typename Traits::connection_state_listener_t > & | connection_state_listener () const noexcept |
Get reference to 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. | |
run_on_thread_pool_settings_t< Traits > && | ip_blocker (std::shared_ptr< typename Traits::ip_blocker_t > blocker) && |
Setter for IP-blocker. | |
const std::shared_ptr< typename Traits::ip_blocker_t > & | ip_blocker () const noexcept |
Get reference to 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. | |
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 > & | incoming_http_msg_limits (const incoming_http_msg_limits_t &limits) &noexcept |
Setter of optional limits for incoming HTTP messages. | |
run_on_thread_pool_settings_t< Traits > && | incoming_http_msg_limits (const incoming_http_msg_limits_t &limits) &&noexcept |
Setter of optional limits for incoming HTTP messages. | |
run_on_thread_pool_settings_t< Traits > & | max_parallel_connections (std::size_t value) &noexcept |
Setter for connection count limit. | |
run_on_thread_pool_settings_t< Traits > && | max_parallel_connections (std::size_t value) &&noexcept |
Setter for connection count limit. | |
std::size_t | max_parallel_connections () const noexcept |
run_on_thread_pool_settings_t< Traits > & | port (std::uint16_t p) & |
Server endpoint. | |
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) && |
run_on_thread_pool_settings_t< Traits > & | address (asio_ns::ip::address addr) & |
run_on_thread_pool_settings_t< Traits > && | address (asio_ns::ip::address addr) && |
const details::address_variant_t & | address () const |
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 > && | 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. | |
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. | |
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. | |
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) & |
run_on_thread_pool_settings_t< Traits > && | acceptor_options_setter (acceptor_options_setter_t aos) && |
std::unique_ptr< acceptor_options_setter_t > | acceptor_options_setter () |
run_on_thread_pool_settings_t< Traits > & | socket_options_setter (socket_options_setter_t sos) & |
run_on_thread_pool_settings_t< Traits > && | socket_options_setter (socket_options_setter_t sos) && |
std::unique_ptr< socket_options_setter_t > | socket_options_setter () |
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 > && | 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) &noexcept |
Do separate an accept operation and connection instantiation. | |
run_on_thread_pool_settings_t< Traits > && | separate_accept_and_create_connect (bool do_separate) &&noexcept |
bool | separate_accept_and_create_connect () const noexcept |
run_on_thread_pool_settings_t< Traits > & | cleanup_func (Func &&func) & |
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_t > | request_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. | |
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 > && | logger (Params &&... params) && |
std::unique_ptr< logger_t > | logger () |
run_on_thread_pool_settings_t< Traits > & | extra_data_factory (extra_data_factory_handle_t factory) & |
Setter for extra-data-factory. | |
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. | |
![]() | |
socket_type_dependent_settings_t () noexcept=default | |
socket_type_dependent_settings_t (const socket_type_dependent_settings_t &) noexcept=default | |
socket_type_dependent_settings_t (socket_type_dependent_settings_t &&) noexcept=default | |
socket_type_dependent_settings_t & | operator= (const socket_type_dependent_settings_t &) noexcept=default |
socket_type_dependent_settings_t & | operator= (socket_type_dependent_settings_t &&) noexcept=delete |
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.