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