RESTinio
|
#include <traits.hpp>
Public Types | |
using | http_methods_mapper_t = default_http_methods_t |
A type for HTTP methods mapping. More... | |
using | connection_state_listener_t = connection_state::noop_listener_t |
A type for connection state listener. More... | |
using | ip_blocker_t = ip_blocker::noop_ip_blocker_t |
A type for IP-blocker. More... | |
using | timer_manager_t = Timer_Manager |
using | logger_t = Logger |
using | request_handler_t = Request_Handler |
using | strand_t = Strand |
using | stream_socket_t = Socket |
Static Public Attributes | |
static constexpr bool | use_connection_count_limiter = false |
A flag that enables or disables the usage of connection count limiter. More... | |
Definition at line 32 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::connection_state_listener_t = connection_state::noop_listener_t |
A type for connection state listener.
By default RESTinio doesn't inform about changes with connection state. But if a user specify its type of connection state listener then RESTinio will call this listener object when the state of connection changes.
An example:
Definition at line 99 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::http_methods_mapper_t = default_http_methods_t |
A type for HTTP methods mapping.
If RESTinio is used with vanila version of http_parser then the default value of http_methods_mapper_t is enough. But if a user uses modified version of http_parser with support of additional, not-standard HTTP methods then the user should provide its http_methods_mapper. For example:
Definition at line 69 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::ip_blocker_t = ip_blocker::noop_ip_blocker_t |
A type for IP-blocker.
By default RESTinio's accepts all incoming connections. But since v.0.5.1 a user can specify IP-blocker object that will be called for every new connection. This IP-blocker can deny or allow a new connection.
Type of that IP-blocker object is specified by typedef ip_blocker_t.
An example:
Definition at line 133 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::logger_t = Logger |
Definition at line 136 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::request_handler_t = Request_Handler |
Definition at line 137 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::strand_t = Strand |
Definition at line 138 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::stream_socket_t = Socket |
Definition at line 139 of file traits.hpp.
using restinio::traits_t< Timer_Manager, Logger, Request_Handler, Strand, Socket >::timer_manager_t = Timer_Manager |
Definition at line 135 of file traits.hpp.
|
staticconstexpr |
A flag that enables or disables the usage of connection count limiter.
Since v.0.6.12 RESTinio allows to limit the number of active parallel connections to a server. But the usage of this limit should be turned on explicitly. For example:
In that case there will be max_parallel_connections
method in server_settings_t type. That method should be explicitly called to set a specific limit (by the default there is no limit at all):
Definition at line 164 of file traits.hpp.