Struct EventContext

Struct Documentation

struct EventContext

The EventContext struct holds fd and callbacks associated with it.

The callback is executed when the fd becomes readable, the on_closed_cb is executed when the fd is removed from the event loop.

Public Members

int fd = {-1}
std::function<void(int)> cb = {nullptr}
std::function<void(int)> on_closed_cb = {nullptr}