TcpListener.onAccept

void onAccept(AcceptCallback callback) @property @trusted

Set the accept callback.

Fires when a new client connection is accepted. The clientHandle is caller-owned — you must call TcpConnection.adopt() to take ownership, or close it via closesocket. Thread affinity: event loop thread only. Non-reentrant.

Parameters

callbackCallback invoked when a new connection is accepted.