TcpConnection.onConnect

void onConnect(ConnectCallback callback) @property @trusted

Set the connect callback.

Parameters

callbackCallback invoked when connection is established. Callback contract: invoked on the event loop thread. The callback must remain valid until the connection is closed or disposed. Does not fire after dispose().