|
error | init () |
|
size_t | num_socket_managers () const noexcept |
| Returns the number of currently active socket managers.
|
|
ptrdiff_t | index_of (const socket_manager_ptr &mgr) const noexcept |
| Returns the index of mgr in the pollset or -1 .
|
|
ptrdiff_t | index_of (socket fd) const noexcept |
| Returns the index of fd in the pollset or -1 .
|
|
middleman & | owner () |
| Returns the owning middleman instance.
|
|
actor_system & | system () |
| Returns the enclosing actor_system.
|
|
void | ref_execution_context () const noexcept override |
| Increases the reference count of the execution_context.
|
|
void | deref_execution_context () const noexcept override |
| Decreases the reference count of the execution context and destroys the object if necessary.
|
|
void | schedule (action what) override |
| Schedules what to run on the event loop of the execution context.
|
|
void | watch (disposable what) override |
| Asks the coordinator to keep its event loop running until what becomes disposed since it depends on external events or produces events that are visible to outside observers.
|
|
void | start (socket_manager_ptr mgr) |
| Registers mgr for initialization in the multiplexer's thread.
|
|
void | shutdown () |
| Signals the multiplexer to initiate shutdown.
|
|
void | register_reading (socket_manager *mgr) |
| Registers mgr for read events.
|
|
void | register_writing (socket_manager *mgr) |
| Registers mgr for write events.
|
|
void | deregister_reading (socket_manager *mgr) |
| Deregisters mgr from read events.
|
|
void | deregister_writing (socket_manager *mgr) |
| Deregisters mgr from write events.
|
|
void | deregister (socket_manager *mgr) |
| Deregisters mgr from read and write events.
|
|
bool | is_reading (const socket_manager *mgr) const noexcept |
| Queries whether mgr is currently registered for reading.
|
|
bool | is_writing (const socket_manager *mgr) const noexcept |
| Queries whether mgr is currently registered for writing.
|
|
bool | poll_once (bool blocking) |
| Polls I/O activity once and runs all socket event handlers that become ready as a result.
|
|
void | poll () |
| Runs poll_once(false) until it returns true .`.
|
|
void | apply_updates () |
| Applies all pending updates.
|
|
void | run_actions () |
| Runs all pending actions.
|
|
void | set_thread_id () |
| Sets the thread ID to std::this_thread::id() .
|
|
void | run () |
| Runs the multiplexer until no socket event handler remains active.
|
|
| atomic_ref_counted (const atomic_ref_counted &) |
|
atomic_ref_counted & | operator= (const atomic_ref_counted &) |
|
void | ref () const noexcept |
| Increases reference count by one.
|
|
void | deref () const noexcept |
| Decreases reference count by one and calls request_deletion when it drops to zero.
|
|
bool | unique () const noexcept |
| Queries whether there is exactly one reference.
|
|
size_t | get_reference_count () const noexcept |
| Queries the current reference count for this object.
|
|
virtual void | ref_execution_context () const noexcept=0 |
| Increases the reference count of the execution_context.
|
|
virtual void | deref_execution_context () const noexcept=0 |
| Decreases the reference count of the execution context and destroys the object if necessary.
|
|
virtual void | schedule (action what)=0 |
| Schedules what to run on the event loop of the execution context.
|
|
template<class F > |
void | schedule_fn (F &&what) |
| Schedules what to run on the event loop of the execution context.
|
|
virtual void | watch (disposable what)=0 |
| Asks the coordinator to keep its event loop running until what becomes disposed since it depends on external events or produces events that are visible to outside observers.
|
|
|
void | handle (const socket_manager_ptr &mgr, short events, short revents) |
| Handles an I/O event on given manager.
|
|
poll_update & | update_for (ptrdiff_t index) |
| Returns a change entry for the socket at given index.
|
|
poll_update & | update_for (socket_manager *mgr) |
| Returns a change entry for the socket of the manager.
|
|
template<class T > |
void | write_to_pipe (uint8_t opcode, T *ptr) |
| Writes opcode and pointer to mgr the the pipe for handling an event later via the pollset updater.
|
|
template<class Enum , class T > |
std::enable_if_t< std::is_enum_v< Enum > > | write_to_pipe (Enum opcode, T *ptr) |
| Writes opcode and pointer to mgr the the pipe for handling an event later via the pollset updater.
|
|
short | active_mask_of (const socket_manager *mgr) const noexcept |
| Queries the currently active event bitmask for mgr .
|
|
Multiplexes any number of ::socket_manager objects with a ::socket.