30 :
public std::enable_shared_from_this< asio_timer_manager_t >
34 asio_ns::io_context & io_context,
45 asio_ns::io_context & io_context,
62 h->check_timeout( h );
102 const std::chrono::steady_clock::duration
112 create( asio_ns::io_context & io_context )
const
114 return std::make_shared< asio_timer_manager_t >( io_context,
m_check_period );
Timer guard for async operations.
asio_ns::steady_timer m_operation_timer
timer_guard_t(asio_ns::io_context &io_context, std::chrono::steady_clock::duration check_period) noexcept
const std::chrono::steady_clock::duration m_check_period
void cancel() noexcept
Cancel timeout guard if any.
void schedule(tcp_connection_ctx_weak_handle_t weak_handle)
Schedule timeouts check invocation.
Timer factory implementation using asio timers.
asio_timer_manager_t(asio_ns::io_context &io_context, std::chrono::steady_clock::duration check_period)
asio_ns::io_context & m_io_context
An instanse of io_context to work with.
timer_guard_t create_timer_guard() const
Create guard for connection.
const std::chrono::steady_clock::duration m_check_period
Check period for timer events.
void stop() const noexcept
void start() const noexcept
Detection of compiler version and absence of various features.
void suppress_exceptions_quietly(Lambda &&lambda) noexcept
Helper function for execution a block of code with suppression of any exceptions raised inside that b...
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.
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 &io_context) const
Create an instance of timer manager.
factory_t(std::chrono::steady_clock::duration check_period) noexcept
const std::chrono::steady_clock::duration m_check_period
Check period for timer events.
Utilities for suppressing exceptions from some code block.