14#include <so_5/all.hpp>
22#if defined(SO_5_VERSION)
23 #if SO_5_VERSION < SO_5_VERSION_MAKE(6ull, 0ull, 0ull)
24 #define RESTINIO_USE_SO_5_5
27 #define RESTINIO_USE_SO_5_5
48#if defined(RESTINIO_USE_SO_5_5)
58 so_5::environment_t & env,
60 std::chrono::steady_clock::duration check_period )
71 so_5::environment_t & env,
73 std::chrono::steady_clock::duration check_period )
135 so_5::environment_t & env,
137 std::chrono::steady_clock::duration check_period = std::chrono::seconds{ 1 } )
168 std::chrono::steady_clock::duration check_period )
174 class timer_guard_t final
179 std::chrono::steady_clock::duration check_period )
211 const so_5::mbox_t
m_mbox;
238 std::chrono::steady_clock::duration check_period = std::chrono::seconds{ 1 } )
245 so_5::environment_t &,
247 std::chrono::steady_clock::duration check_period = std::chrono::seconds{ 1 } )
252 create( asio_ns::io_context & )
const
270 :
public so_5::agent_t
282 h->check_timeout( h );
Agent that handles timeouts.
so_5::agent_t so_base_type_t
a_timeout_handler_t(context_t ctx)
Timer guard for async operations.
const std::chrono::steady_clock::duration m_check_period
timer_guard_t(so_5::environment_t &env, so_5::mbox_t mbox, std::chrono::steady_clock::duration check_period)
void schedule(tcp_connection_ctx_weak_handle_t weak_handle)
Schedule timeout check invocation.
void cancel() noexcept
Cancel timeout guard if any.
const so_5::mbox_t m_mbox
so_5::timer_id_t m_current_op_timer
so_5::environment_t & m_env
Timer factory implementation using timers from SObjectizer.
so_timer_manager_t(so_5::environment_t &env, so_5::mbox_t mbox, std::chrono::steady_clock::duration check_period)
timer_guard_t create_timer_guard()
so_5::environment_t & m_env
const std::chrono::steady_clock::duration m_check_period
void start() const noexcept
Start/stop timer manager.
void stop() const noexcept
Detection of compiler version and absence of various features.
#define RESTINIO_ENSURE_NOEXCEPT_CALL(expr)
A wrapper around static_assert for checking that an expression is noexcept and execution of that expr...
std::weak_ptr< tcp_connection_ctx_base_t > tcp_connection_ctx_weak_handle_t
Alias for http connection weak handle.
tcp_connection_ctx_weak_handle_t m_weak_handle
msg_check_timer_t(tcp_connection_ctx_weak_handle_t weak_handle)
const std::chrono::steady_clock::duration m_check_period
factory_t(so_5::environment_t &env, so_5::mbox_t mbox, std::chrono::steady_clock::duration check_period=std::chrono::seconds{ 1 })
so_5::environment_t & m_env
auto create(asio_ns::io_context &) const