@honua/sdk-js
    Preparing search index...

    Interface RealtimeWebSocket

    Minimal WebSocket surface the transport depends on. The global WebSocket constructor (browsers, and Node's built-in client since Node 22) already satisfies this; pass webSocketFactory to supply a polyfill or a mock in tests without adding a runtime dependency.

    interface RealtimeWebSocket {
        onclose: ((event: RealtimeWebSocketCloseEvent) => void) | null;
        onerror: ((event: Event) => void) | null;
        onmessage: ((event: MessageEvent<string>) => void) | null;
        onopen: ((event: Event) => void) | null;
        readyState?: number;
        close(code?: number, reason?: string): void;
        send(data: string): void;
    }
    Index

    Properties

    onclose: ((event: RealtimeWebSocketCloseEvent) => void) | null
    onerror: ((event: Event) => void) | null
    onmessage: ((event: MessageEvent<string>) => void) | null
    onopen: ((event: Event) => void) | null
    readyState?: number

    Methods