OsPoller.wait

int wait(scope NativeEvent[] nativeEvents, int timeoutMs) @trusted nothrow @nogc

Wait for native events.

This method uses a hybrid approach:

  • WSAPoll for socket readiness (reliable, edge-triggered semantics)
  • IOCP for wakeup events and future non-socket handles

Parameters

nativeEventsCaller-provided output buffer for native events.
timeoutMsWait timeout in milliseconds. -1 means infinite.

Returns

Number of events written to nativeEvents, or -1 with error set.