TcpConnection.onError

void onError(ErrorCallback callback) @property @trusted

Set the error callback.

Parameters

callbackCallback invoked on connection errors. Callback contract: fires before onClose. The connection should be closed after an error. Does not fire after dispose().