onError

fun onError(message: String)

Fails the incomingFrames flow with a WebSocketException with the given message.

Only onClose is safe to call after a call to this method, calling any other method may throw an exception.


fun onError(error: Throwable?)

Fails the incomingFrames flow with a WebSocketException with the given error as cause.

Only onClose is safe to call after a call to this method, calling any other method may throw an exception.