TcpConnection.onClose

void onClose(CloseCallback callback) @property @trusted

Set the close callback.

Fires when the remote end closes the connection or a fatal error occurs. May fire after close() if data was still pending. Does not fire after dispose(). Thread affinity: event loop thread only. Non-reentrant.

Parameters

callbackCallback invoked when the connection closes.