WebSocketConnection

Functions

Link copied to clipboard
abstract fun close()

closes the websocket gracefully and asynchronously

Link copied to clipboard
abstract suspend fun receive(): String

Suspends until a message is available and return it. If the message was binary, it is converted to a String

Link copied to clipboard
abstract fun send(string: String)

Sends a text message asynchronously.

abstract fun send(data: ByteString)

Sends a binary message asynchronously.