TcpConnection.onError
Set the error callback.
Fires on connection errors. After this callback, the connection enters an error state; onClose may or may not follow.
- Thread affinity: event loop thread only. Non-reentrant.
- Does not fire after
dispose().Parameters