KtorRealtimeWebsocket

class KtorRealtimeWebsocket(ws: DefaultClientWebSocketSession) : RealtimeWebsocket(source)

Implementation of RealtimeWebsocket using Ktor's DefaultClientWebSocketSession.

Constructors

Link copied to clipboard
constructor(ws: DefaultClientWebSocketSession)

Properties

Link copied to clipboard
open override val hasIncomingMessages: Boolean

Whether there are incoming messages that can be received.

Functions

Link copied to clipboard
open suspend override fun blockUntilDisconnect()

Block the current coroutine until the websocket is disconnected.

Link copied to clipboard
open override fun disconnect()

Disconnect the websocket.

Link copied to clipboard
open override fun makeRef(): String

Generates a new ref for a realtime message

Link copied to clipboard
open suspend override fun receive(): Frame

Receive a frame from the websocket.

Link copied to clipboard
open suspend override fun send(data: ByteArray)

Sends a binary message to the websocket.

open suspend override fun send(message: RealtimeMessage, vsn: RealtimeProtocolVersion)

Send a message to the websocket.