interface IRealtimeClient

A running realtime WebSocket client.

Type Parameters

TOutgoing = unknown

Properties

Current lifecycle state.

Methods

send(message: TOutgoing): void

Serializes non-string values as JSON and sends a text frame.

close(
code?: number,
reason?: string
): void

Stops future reconnect attempts and closes the active socket.

Usage

import { type IRealtimeClient } from "sdk/src/index.ts";