OsPoller.registerCompletion

int registerCompletion(void * context, CompletionCallback callback) @trusted nothrow

Register a completion handler for a given context pointer.

When an IOCP completion arrives with a completionKey matching context, the provided callback is invoked.

Parameters

contextOpaque pointer used as the IOCP completion key. Typically the this pointer of the I/O object.
callbackFunction to invoke when a completion is dequeued.

Returns

0 on success, or -1 if the table is full.