qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::io::async::event::io Struct Reference

Event for file descriptor I/O readiness notifications (read/write). More...

#include <io.h>

Inheritance diagram for qb::io::async::event::io:
Collaboration diagram for qb::io::async::event::io:

Public Types

using base_t = base<ev::io>
 Base type alias for base<ev::io>.
Public Types inherited from qb::io::async::event::base< ev::io >
using ev_t
 Alias for the underlying libev event watcher type.

Public Member Functions

 io (ev::loop_ref loop)
 Constructor.
Public Member Functions inherited from qb::io::async::event::base< ev::io >
 base (ev::loop_ref loop)
 Constructor.

Additional Inherited Members

Public Attributes inherited from qb::io::async::event::base< ev::io >
IRegisteredKernelEvent_interface
 Pointer to the kernel event interface responsible for handling this event.
int _revents
 Stores the event flags (e.g., EV_READ, EV_WRITE) received from libev when the event triggers.

Detailed Description

Event for file descriptor I/O readiness notifications (read/write).

This event extends qb::io::async::event::base<ev::io> and thus wraps an ev::io watcher from libev. It is used by asynchronous I/O components (like those derived from qb::io::async::input, output, or io) to monitor file descriptors (e.g., sockets) for readiness to perform read or write operations without blocking.

The _revents member of this struct (inherited from event::base) will contain flags like EV_READ or EV_WRITE indicating the type of readiness.

Note
This event is primarily used internally by the qb-io asynchronous framework (e.g., within qb::io::async::io::on(event::io const &event)). Application code typically handles higher-level events like message arrival or disconnection rather than directly processing this raw I/O readiness event.

Constructor & Destructor Documentation

◆ io()

qb::io::async::event::io::io ( ev::loop_ref loop)
inlineexplicit

Constructor.

Parameters
loopReference to the libev event loop (ev::loop_ref) this event watcher will be associated with.