TaskBridgeWebSocketSession

Abstraction for a WebSocket session.

Functions

Link copied to clipboard
abstract fun cancel()

Immediately terminates the WebSocket connection.

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

Gracefully closes the WebSocket connection.

Link copied to clipboard
abstract fun send(text: String): Boolean

Sends a text message over the WebSocket.