Websocket

interface Websocket

Represents a connected Websocket instance, and can be passed around an application. This is configured to react to events on the WS event stream by attaching listeners.

Inheritors

Functions

Link copied to clipboard
abstract fun close(status: WsStatus = NORMAL)
Link copied to clipboard
abstract fun onClose(fn: (WsStatus) -> Unit)
Link copied to clipboard
abstract fun onError(fn: (Throwable) -> Unit)
Link copied to clipboard
abstract fun onMessage(fn: (WsMessage) -> Unit)
Link copied to clipboard
abstract fun send(message: WsMessage)