12#include "BorrowedFd.hpp"
13#include "Callback.hpp"
Event interest and trigger flags for file-descriptor watching (Linux/epoll).
Non-owning wrapper around a file descriptor.
Definition BorrowedFd.hpp:37
Bitset wrapper for dfx::FdWatch::EventInterest values.
Abstract interface for FD-based event polling.
Definition Poller.hpp:37
virtual void registerFd(BorrowedFd fd, EventInterests events, FdCallback cb)=0
Registers a file descriptor with the poller.
virtual ~Poller()=default
Virtual destructor for interface.
virtual void deregisterFd(BorrowedFd fd) noexcept=0
Deregisters a file descriptor from the poller.
virtual void deferCall(Callback cb)=0
Defer the call to the callback to the next time the event loop is reached.
Definition SocketClient.hpp:23
std::function< void(BorrowedFd, EventTriggers)> FdCallback
Invoked when events occur on a watched file descriptor.
Definition Callback.hpp:28
std::move_only_function< void()> Callback
Generic move-only callback with no arguments.
Definition Callback.hpp:31