TrinityCore
Loading...
Searching...
No Matches
Trinity::Asio::IoContext Class Reference

#include <IoContext.h>

Public Types

using executor_type = IoContextExecutor
 

Public Member Functions

 IoContext ()
 
 IoContext (int concurrency_hint)
 
 operator boost::asio::io_context & ()
 
 operator boost::asio::io_context const & () const
 
std::size_t run ()
 
std::size_t poll ()
 
void stop ()
 
bool stopped () const
 
void restart ()
 
executor_type get_executor () noexcept
 

Private Attributes

boost::asio::io_context _impl
 

Detailed Description

Definition at line 53 of file IoContext.h.

Member Typedef Documentation

◆ executor_type

Constructor & Destructor Documentation

◆ IoContext() [1/2]

Trinity::Asio::IoContext::IoContext ( )
inline

Definition at line 58 of file IoContext.h.

◆ IoContext() [2/2]

Trinity::Asio::IoContext::IoContext ( int  concurrency_hint)
inlineexplicit

Definition at line 59 of file IoContext.h.

Member Function Documentation

◆ get_executor()

executor_type Trinity::Asio::IoContext::get_executor ( )
inlinenoexcept

Definition at line 71 of file IoContext.h.

References _impl.

Referenced by Trinity::Net::AsyncAcceptor::AsyncAccept(), main(), and MySQLConnection::StartWorkerThread().

◆ operator boost::asio::io_context &()

Trinity::Asio::IoContext::operator boost::asio::io_context & ( )
inline

Definition at line 61 of file IoContext.h.

References _impl.

◆ operator boost::asio::io_context const &()

Trinity::Asio::IoContext::operator boost::asio::io_context const & ( ) const
inline

Definition at line 62 of file IoContext.h.

References _impl.

◆ poll()

std::size_t Trinity::Asio::IoContext::poll ( )
inline

Definition at line 65 of file IoContext.h.

References _impl.

◆ restart()

void Trinity::Asio::IoContext::restart ( )
inline

Definition at line 69 of file IoContext.h.

References _impl.

◆ run()

std::size_t Trinity::Asio::IoContext::run ( )
inline

◆ stop()

void Trinity::Asio::IoContext::stop ( )
inline

Definition at line 66 of file IoContext.h.

References _impl.

Referenced by Trinity::Net::NetworkThread< SocketType, DerivedThread >::Stop().

◆ stopped()

bool Trinity::Asio::IoContext::stopped ( ) const
inline

Definition at line 68 of file IoContext.h.

References _impl.

Member Data Documentation

◆ _impl

boost::asio::io_context Trinity::Asio::IoContext::_impl
private

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