WebSocket

Functions

Link copied to clipboard
abstract fun close(code: Int, reason: String)

If the websocket is connected, attempts to close the websocket gracefully and asynchronously by sending a close frame with code and reason. In all cases, release its resources.

Link copied to clipboard
abstract fun send(data: ByteArray)

Sends a binary message asynchronously.

abstract fun send(text: String)

Sends a text message asynchronously.