OsPoller.associateHandle

int associateHandle(HANDLE handle, ulong completionKey) @trusted nothrow @nogc

Associate a handle with the IOCP for overlapped I/O.

This binds a handle to the completion port so that overlapped I/O operations on the handle will generate completion notifications.

Parameters

handleThe native Windows handle to associate.
completionKeyOpaque value returned with completions for this handle.

Returns

0 on success, or -1 with last error set on failure.