RESTinio
Loading...
Searching...
No Matches
ip_blocker.hpp
Go to the documentation of this file.
1/*
2 * RESTinio
3 */
4
12#pragma once
13
15
16namespace restinio
17{
18
19namespace ip_blocker
20{
21
22//
23// inspection_result_t
24//
31{
33 deny,
35 allow
36};
37
43inline constexpr inspection_result_t
45
51inline constexpr inspection_result_t
53
54//
55// incoming_info_t
56//
78
79//
80// noop_ip_blocker_t
81//
94{
95 // empty type by design.
96};
97
98} /* namespace ip_blocker */
99
100} /* namespace restinio */
101
An information about new incoming connection to be passed to IP-blocker object.
endpoint_t remote_endpoint() const noexcept
Remote endpoint of the new connection.
incoming_info_t(endpoint_t remote_endpoint)
Initializing constructor.
constexpr inspection_result_t deny() noexcept
Shorthand for inspection_result_t::deny.
inspection_result_t
Enumeration of result of inspecting new incoming connection.
@ deny
New connection is disabled and should be closed.
@ allow
New connection is allowed to be processed further.
constexpr inspection_result_t allow() noexcept
Shorthand for inspection_result_t::allow.
run_on_this_thread_settings_t< Traits > on_this_thread()
A special marker for the case when http_server must be run on the context of the current thread.
asio_ns::ip::tcp::endpoint endpoint_t
An alias for endpoint type from Asio.
The default no-op IP-blocker.
#define const
Definition zconf.h:230