RESTinio
|
An interface of acceptor to be used by connection count limiters. More...
#include <connection_count_limiter.hpp>
Public Member Functions | |
virtual void | call_accept_now (std::size_t index) noexcept=0 |
virtual void | schedule_next_accept_attempt (std::size_t index) noexcept=0 |
An interface of acceptor to be used by connection count limiters.
An instance of a connection count limiter will receive a reference to the acceptor. The limiter has to call the acceptor and this interface declares methods of the acceptor that will be invoked by the limiter.
The assumed working scheme is:
Definition at line 77 of file connection_count_limiter.hpp.
|
pure virtualnoexcept |
This method will be invoked by a limiter when there is a possibility to call accept() right now.
index | An index of socket's slot to be used for accept(). |
Implemented in restinio::impl::acceptor_t< Traits >.
|
pure virtualnoexcept |
This method will be invoked by a limiter when there is no possibility to call accept() right now, but the next call to accept_next should be scheduled as soon as possible in the appropriate worker context.
It is assumed that the acceptor will use asio::post() with a completion handler that calls the accept_next method of the limiter.
index | An index of socket's slot to be used for accept(). |
Implemented in restinio::impl::acceptor_t< Traits >.