RESTinio
Classes | Public Member Functions | Private Attributes | List of all members
restinio::asio_timer_manager_t Class Referencefinal

Timer factory implementation using asio timers. More...

#include <asio_timer_manager.hpp>

Inheritance diagram for restinio::asio_timer_manager_t:

Classes

struct  factory_t
 
class  timer_guard_t
 Timer guard for async operations. More...
 

Public Member Functions

 asio_timer_manager_t (asio_ns::io_context &io_context, std::chrono::steady_clock::duration check_period)
 
timer_guard_t create_timer_guard () const
 Create guard for connection. More...
 
Start/stop timer manager.
void start () const noexcept
 
void stop () const noexcept
 

Private Attributes

asio_ns::io_context & m_io_context
 An instanse of io_context to work with. More...
 
const std::chrono::steady_clock::duration m_check_period
 Check period for timer events. More...
 

Detailed Description

Timer factory implementation using asio timers.

Examples:
sample/express_router/main.cpp, sample/express_router_tutorial/main.cpp, sample/hello_world/main.cpp, sample/hello_world_https/main.cpp, sample/hello_world_sendfile/main.cpp, sample/hello_world_sendfile_https/main.cpp, sample/sendfiles/main.cpp, sample/websocket/main.cpp, sample/websocket_detailed/main.cpp, and sample/websocket_wss/main.cpp.

Definition at line 26 of file asio_timer_manager.hpp.

Constructor & Destructor Documentation

◆ asio_timer_manager_t()

restinio::asio_timer_manager_t::asio_timer_manager_t ( asio_ns::io_context &  io_context,
std::chrono::steady_clock::duration  check_period 
)
inline

Definition at line 30 of file asio_timer_manager.hpp.

Member Function Documentation

◆ create_timer_guard()

timer_guard_t restinio::asio_timer_manager_t::create_timer_guard ( ) const
inline

Create guard for connection.

Definition at line 80 of file asio_timer_manager.hpp.

◆ start()

void restinio::asio_timer_manager_t::start ( ) const
inlinenoexcept

Definition at line 87 of file asio_timer_manager.hpp.

◆ stop()

void restinio::asio_timer_manager_t::stop ( ) const
inlinenoexcept

Definition at line 88 of file asio_timer_manager.hpp.

Member Data Documentation

◆ m_check_period

const std::chrono::steady_clock::duration restinio::asio_timer_manager_t::m_check_period
private

Check period for timer events.

Definition at line 115 of file asio_timer_manager.hpp.

◆ m_io_context

asio_ns::io_context& restinio::asio_timer_manager_t::m_io_context
private

An instanse of io_context to work with.

Definition at line 112 of file asio_timer_manager.hpp.


The documentation for this class was generated from the following file: