qb  2.0.0.0
C++17 Actor Framework
qb Issue Watch Star Fork Follow @isndev
Loading...
Searching...
No Matches
qb::io::async::IRegisteredKernelEvent Interface Referenceabstract

Interface for kernel event registration and invocation. More...

#include <base.h>

Inheritance diagram for qb::io::async::IRegisteredKernelEvent:

Public Member Functions

virtual ~IRegisteredKernelEvent ()=default
 Virtual destructor.
virtual void invoke ()=0
 Event invocation method, called by the listener when the event triggers.

Detailed Description

Interface for kernel event registration and invocation.

This interface provides a common abstraction for objects that can be registered with the listener to handle specific kernel-level events (wrapped by libev). When a monitored event occurs, the listener calls the invoke() method of the corresponding IRegisteredKernelEvent implementation.

Member Function Documentation

◆ invoke()

virtual void qb::io::async::IRegisteredKernelEvent::invoke ( )
pure virtual

Event invocation method, called by the listener when the event triggers.

Implementing classes should define their specific event handling logic in this method. This typically involves casting to the concrete event type and calling the user's on(SpecificEvent&) handler.