RealtimeWebsocket

@SubclassOptInRequired(markerClass = [SupabaseInternal::class])
interface RealtimeWebsocket(source)

Interface for a websocket connection to the Supabase Realtime service.

Inheritors

Properties

Link copied to clipboard

Whether there are incoming messages that can be received.

Functions

Link copied to clipboard
abstract suspend fun blockUntilDisconnect()

Block the current coroutine until the websocket is disconnected.

Link copied to clipboard
abstract fun disconnect()

Disconnect the websocket.

Link copied to clipboard
abstract fun makeRef(): String

Generates a new ref for a realtime message

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

Receive a frame from the websocket.

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

Sends a binary message to the websocket.

abstract suspend fun send(message: RealtimeMessage, vsn: RealtimeProtocolVersion)

Send a message to the websocket.