eve.backend.common
Shared Layer 0 types used by all OS backends.
This module keeps the vocabulary between platform pollers small and explicit so higher layers can talk about handles, interests, readiness, and translated events without depending on OS-specific constants.
Types 12
Lightweight wrapper around the backend's native handle type.
The wrapper does not own the handle lifetime. It exists so higher layers can avoid passing raw OS primitives directly.
NativeHandle valueHandle(INVALID_NATIVE_HANDLE) invalidSentinel handle used when a registration has no valid native handle.bool isValid() @property const pure @safe nothrow @nogcCheck whether the wrapped handle is valid for the current platform.Address families for networking.
This enum is used instead of Phobos' std.socket.AddressFamily to remain strictly @nogc and to keep the vocabulary between OS backends normalized and small.
Representation of an IP address.
This struct is used instead of Phobos' std.socket.Address classes to ensure zero-allocation performance and to allow embedding directly into WatcherSlot unions.
AddressFamily familyCommon DNS resolution errors.
Action taken when an EventLoop resource limit is hit.
Types of resource limits tracked by an EventLoop.
Resource limits configuration for an EventLoop.
uint maxWatchersMaximum number of registered watchers. 0 = unlimited.size_t maxSendQueueBytesMaximum total bytes in TCP send queues. 0 = unlimited.uint maxTimersMaximum pending timer count. 0 = unlimited.uint maxFdsMaximum file descriptors to keep open. 0 = use system limit.uint maxConnectionsMaximum number of active connections. 0 = unlimited.LimitAction onLimitHitAction when a limit is hit.Snapshot of current resource usage in an EventLoop.
size_t watchersTotal number of active watchers.size_t sendQueueBytesTotal bytes buffered in all send queues.size_t timersTotal number of active timers.size_t activeConnectionsTotal number of active network connections.size_t fileDescriptorsEstimate of total open file descriptors managed by the loop.Normalized signal values that higher layers may care about.
Requested I/O interests.
Instances behave like a small bit-mask value that can be combined with `|` and tested with contains.
ushort bitsIoInterest(0) noneNo readiness requested.IoInterest(1 << 0) readableReadability requested.IoInterest(1 << 1) writableWritability requested.IoInterest(1 << 2) priorityExceptional or priority data requested.IoInterest(1 << 3) errorError notifications requested.IoInterest(1 << 4) hangupHangup notifications requested.bool contains(IoInterest other) const pure @safe nothrow @nogcCheck whether all bits from `other` are present.IoInterest opBinary(string op : "|")(IoInterest other) const pure @safe nothrow @nogcCombine two interest masks.IoInterest opBinary(string op : "&")(IoInterest other) const pure @safe nothrow @nogcIntersect two interest masks.IoInterest opBinary(string op : "^")(IoInterest other) const pure @safe nothrow @nogcToggle bits from another interest mask.void opOpAssign(string op : "|")(IoInterest other) pure @safe nothrow @nogcAdd interest bits in place.void opOpAssign(string op : "&")(IoInterest other) pure @safe nothrow @nogcKeep only intersecting interest bits in place.void opOpAssign(string op : "^")(IoInterest other) pure @safe nothrow @nogcToggle interest bits in place.Actual readiness reported by the OS backend.
ushort bitsIoReady(0) noneNo readiness reported.IoReady(1 << 0) readableReadability reported.IoReady(1 << 1) writableWritability reported.IoReady(1 << 2) priorityExceptional or priority data reported.IoReady(1 << 3) errorError state reported.IoReady(1 << 4) hangupHangup or peer shutdown reported.bool contains(IoReady other) const pure @safe nothrow @nogcCheck whether all bits from `other` are present.IoReady opBinary(string op : "|")(IoReady other) const pure @safe nothrow @nogcCombine two readiness masks.IoReady opBinary(string op : "&")(IoReady other) const pure @safe nothrow @nogcIntersect two readiness masks.IoReady opBinary(string op : "^")(IoReady other) const pure @safe nothrow @nogcToggle bits from another readiness mask.void opOpAssign(string op : "|")(IoReady other) pure @safe nothrow @nogcAdd readiness bits in place.void opOpAssign(string op : "&")(IoReady other) pure @safe nothrow @nogcKeep only intersecting readiness bits in place.void opOpAssign(string op : "^")(IoReady other) pure @safe nothrow @nogcToggle readiness bits in place.