Optional
onAuthError?: MessageHandler<AuthReply>Called if the authentication fails.
Optional
onClose?: CloseHandlerCalled on WebSocket close.
Optional
onError?: ErrorHandlerCalled on WebSocket error.
Called on every Message. This is the main message handling callback.
Type definition for WebSocket event handlers.