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

    Variable CloseReasonConst

    CloseReason: {
        AuthFailed: "Auth failed";
        HeartbeatTimeout: "Heartbeat timeout";
        InvalidAuthPayload: "Invalid auth payload";
        Kicked: "Kicked from room";
        MissingRoomOrPeer: "Missing roomId or peerId";
        ReplacedByReconnection: "Replaced by reconnection";
        RoomClosing: "Room is closing";
        RoomFull: "Room is full";
        SendBufferOverflow: "Send buffer overflow";
        ServerAtCapacity: "Server at capacity";
        ServerStopping: "Server stopping";
        WrongNode: "Room owned by another node — reconnect to owner";
    } = ...

    Human-readable reason strings paired with a CloseCode on the WebSocket close frame, so clients can distinguish why they were disconnected.

    Type Declaration

    • ReadonlyAuthFailed: "Auth failed"

      The AuthFunction rejected the token.

    • ReadonlyHeartbeatTimeout: "Heartbeat timeout"

      The peer missed the pong deadline and was pruned by the heartbeat monitor.

    • ReadonlyInvalidAuthPayload: "Invalid auth payload"

      The auth payload failed AuthPayloadSchema validation.

    • ReadonlyKicked: "Kicked from room"

      The peer was removed via Room.kickPeer without a custom reason.

    • ReadonlyMissingRoomOrPeer: "Missing roomId or peerId"

      The auth payload lacked a roomId or peerId.

    • ReadonlyReplacedByReconnection: "Replaced by reconnection"

      A newer connection with the same peer id replaced this one.

    • ReadonlyRoomClosing: "Room is closing"

      The room closed (last peer left) while this peer's join was in flight.

    • ReadonlyRoomFull: "Room is full"

      The room already holds maxPeersPerRoom peers.

    • ReadonlySendBufferOverflow: "Send buffer overflow"

      The peer's outbound send buffer exceeded its cap (slow/stalled consumer).

    • ReadonlyServerAtCapacity: "Server at capacity"

      The server is at its global connection cap.

    • ReadonlyServerStopping: "Server stopping"

      The server is shutting down via SignalingServer.stop.

    • ReadonlyWrongNode: "Room owned by another node — reconnect to owner"

      In cluster mode, this room is owned by another node; the client should reconnect to the owner.