RTCForge API Reference v1.1.1
    Preparing search index...

    Variable ClientEventConst

    ClientEvent: {
        Connected: "connected";
        Disconnected: "disconnected";
        Error: "error";
        Reconnecting: "reconnecting";
        Terminated: "terminated";
    } = ...

    Lifecycle events emitted by an RTCForgeClient.

    Type Declaration

    • ReadonlyConnected: "connected"

      The client joined the room and the signaling socket is open (also re-fires after a successful rejoin).

    • ReadonlyDisconnected: "disconnected"

      The signaling socket closed; handler receives the close code and reason.

    • ReadonlyError: "error"

      A transport or server error occurred; handler receives an Error.

    • ReadonlyReconnecting: "reconnecting"

      A reconnect attempt started; handler receives the attempt number.

    • ReadonlyTerminated: "terminated"

      The connection is permanently terminated — a non-retryable close (e.g. expired/rejected token, code 1008) or reconnect exhaustion. Handler receives code and reason. The client resets so you can joinRoom again (e.g. after refreshing credentials) without calling leave() first.