eve.backend.posix.select

POSIX Layer 0 fallback backend built on select.

This backend trades scalability for portability and auditability. It keeps a fixed-capacity registration table, rebuilds fd_set values on each wait, and translates readiness into the shared OsEvent shape used by Layer 1.

select cannot reliably surface hangups as a distinct readiness class across arbitrary file descriptors, so hangup-only registrations are rejected explicitly instead of being reported inaccurately.

Types 3

private structRegistration
Fields
IoInterest interest
ulong userData
bool active

Native event type returned by the select backend.

Unlike epoll, select does not produce a kernel-owned event payload, so the backend materializes a small translated record directly.

Fields
Handle handleHandle that became ready.
ulong userDataOpaque user value supplied at registration time.
IoReady readyShared readiness flags observed for the handle.
structOsPoller

select-backed poller state.

Fields
private Registration[FD_SETSIZE] _registrations
private int _maxFd
private bool _valid
Methods
OsPoller create() @safe nothrow @nogcCreate a new `select` poller.
bool isValid() @property const pure @safe nothrow @nogcCheck whether the poller instance is still usable.
Handle handle() @property const pure @safe nothrow @nogcReturn the native handle wrapper for this poller.
int dispose() @safe nothrow @nogcDispose the poller and drop all registrations.
int registerHandle(Handle handle, IoInterest interest, ulong userData) @safe nothrow @nogcRegister a handle with the given interests and opaque user data.
int modifyHandle(Handle handle, IoInterest interest, ulong userData) @safe nothrow @nogcModify the interest mask and user data for an already-registered handle.
int unregisterHandle(Handle handle) @safe nothrow @nogcRemove a handle from the `select` registration table.
int wait(scope NativeEvent[] nativeEvents, int timeoutMs) @trusted nothrow @nogcWait for native events.
OsEvent translate(ref const(NativeEvent) nativeEvent) pure @safe nothrow @nogcTranslate a native `select` event into the shared Layer 0 event shape.
IoReady translateReady(IoReady nativeReady) pure @safe nothrow @nogcTranslate native readiness into shared readiness flags.