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 suspend override fun receive(): RealtimeMessage

Receive a message from the websocket.

Link copied to clipboard
open suspend override fun send(message: RealtimeMessage)

Send a message to the websocket.