onError

fun onError(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: (<Error class: unknown class>) -> Unit): <Error class: unknown class>(source)

Emitted when an error occurred on the WebSocket.

This may be fired multiple times. Fatal errors will be followed by the signal@WebsocketConnection::closed signal being emitted.

Parameters

connectFlags

a combination of ConnectFlags

handler

the Callback to connect. Params: error the error that occured