|
Net++
A class-based C++ encapsulation over the POSIX Sockets API
|
Handles the event loop. More...
#include <io_context.hpp>
Public Types | |
| using | io_context_ptr = std::shared_ptr< async::IOContext > |
Public Member Functions | |
| IOContext () | |
| IOContext constructor. | |
| IOContext (IOContext &&other) noexcept | |
| IOContext move constructor. | |
| IOContext & | operator= (IOContext &&other) noexcept |
| IOContext move assignment operator. | |
| io_context_ptr | create () |
| Creates an instance of IOContext wrapped in shared_ptr. | |
| event_base * | c_base () const |
| Gives a pointer to the event base struct for libevent calls. | |
| void | run () const |
| Runs the event loop. | |
Handles the event loop.
Uses libevent under the hood to dispatch callbacks upon event
| using async::IOContext::io_context_ptr = std::shared_ptr<async::IOContext> |
| async::IOContext::IOContext | ( | ) |
IOContext constructor.
Allocates memory for, and initializes the underlying event base handle
|
noexcept |
| event_base * async::IOContext::c_base | ( | ) | const |
Gives a pointer to the event base struct for libevent calls.
| io_context_ptr async::IOContext::create | ( | ) |
| void async::IOContext::run | ( | ) | const |
Runs the event loop.