|
unilink
0.4.3
A simple C++ library for unified async communication
|
#include <io_context_manager.hpp>
Classes | |
| struct | Impl |
Public Types | |
| using | IoContext = boost::asio::io_context |
| using | WorkGuard = boost::asio::executor_work_guard< IoContext::executor_type > |
Public Member Functions | |
| IoContextManager () | |
| IoContextManager (std::shared_ptr< IoContext > external_context) | |
| IoContextManager (IoContext &external_context) | |
| ~IoContextManager () | |
| IoContextManager (IoContextManager &&) noexcept | |
| IoContextManager & | operator= (IoContextManager &&) noexcept |
| IoContextManager (const IoContextManager &)=delete | |
| IoContextManager & | operator= (const IoContextManager &)=delete |
| IoContext & | get_context () |
| void | start () |
| void | stop () |
| bool | is_running () const |
| std::unique_ptr< IoContext > | create_independent_context () |
Static Public Member Functions | |
| static IoContextManager & | instance () |
Global io_context manager All Transports share one io_context for improved memory efficiency
Definition at line 32 of file io_context_manager.hpp.
| using unilink::concurrency::IoContextManager::IoContext = boost::asio::io_context |
Definition at line 34 of file io_context_manager.hpp.
| using unilink::concurrency::IoContextManager::WorkGuard = boost::asio::executor_work_guard<IoContext::executor_type> |
Definition at line 35 of file io_context_manager.hpp.
| unilink::concurrency::IoContextManager::IoContextManager | ( | ) |
Definition at line 101 of file io_context_manager.cc.
|
explicit |
Definition at line 103 of file io_context_manager.cc.
|
explicit |
Definition at line 106 of file io_context_manager.cc.
|
default |
|
defaultnoexcept |
|
delete |
| std::unique_ptr< boost::asio::io_context > unilink::concurrency::IoContextManager::create_independent_context | ( | ) |
Definition at line 177 of file io_context_manager.cc.
| boost::asio::io_context & unilink::concurrency::IoContextManager::get_context | ( | ) |
Definition at line 115 of file io_context_manager.cc.
|
static |
Definition at line 110 of file io_context_manager.cc.
| bool unilink::concurrency::IoContextManager::is_running | ( | ) | const |
Definition at line 175 of file io_context_manager.cc.
|
delete |
|
defaultnoexcept |
| void unilink::concurrency::IoContextManager::start | ( | ) |
Definition at line 124 of file io_context_manager.cc.
| void unilink::concurrency::IoContextManager::stop | ( | ) |
Definition at line 173 of file io_context_manager.cc.