TcpConnection.adopt

AdoptStatus adopt(ref EventLoop loop, Handle clientHandle) @trusted nothrow

Adopt an already-accepted client socket.

Parameters

loopEvent loop to register with.
clientHandleSocket handle from accept.

Returns

AdoptStatus — success, or an AdoptError payload with the

reason and the captured OS error code.

Ownership transfer: on success, EVE takes ownership of clientHandle; the caller must not close the OS handle directly. On failure, ownership remains with the caller.