Go to the documentation of this file.
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 );
Timer factory implementation using timers from SObjectizer.
msg_check_timer_t(tcp_connection_ctx_weak_handle_t weak_handle)
timer_guard_t create_timer_guard()
timer_guard_t(so_5::environment_t &env, so_5::mbox_t mbox, std::chrono::steady_clock::duration check_period)
Timer guard for async operations.
so_5::environment_t & m_env
Agent that handles timeouts.
void cancel() noexcept
Cancel timeout guard if any.
#define RESTINIO_ENSURE_NOEXCEPT_CALL(expr)
A wrapper around static_assert for checking that an expression is noexcept and execution of that expr...
so_5::environment_t & m_env
a_timeout_handler_t(context_t ctx)
so_5::agent_t so_base_type_t
tcp_connection_ctx_weak_handle_t m_weak_handle
const so_5::mbox_t m_mbox
void schedule(tcp_connection_ctx_weak_handle_t weak_handle)
Schedule timeout check invocation.
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
const std::chrono::steady_clock::duration m_check_period
so_5::timer_id_t m_current_op_timer
Detection of compiler version and absence of various features.
std::weak_ptr< tcp_connection_ctx_base_t > tcp_connection_ctx_weak_handle_t
Alias for http connection weak handle.
auto create(asio_ns::io_context &) const
const std::chrono::steady_clock::duration m_check_period
so_timer_manager_t(so_5::environment_t &env, so_5::mbox_t mbox, std::chrono::steady_clock::duration check_period)
void stop() const noexcept
void start() const noexcept
Start/stop timer manager.