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

    Variable MessageTypeConst

    MessageType: {
        Broadcast: "broadcast";
        Error: "error";
        Kicked: "kicked";
        PeerJoined: "peer-joined";
        PeerLeft: "peer-left";
        Ping: "ping";
        Pong: "pong";
        PresenceOffline: "presence-offline";
        PresenceOnline: "presence-online";
        RoleChanged: "role-changed";
        RoomJoined: "room-joined";
        Signal: "signal";
    } = ...

    Discriminator values for every message exchanged over the signaling Transport. Each value is the type field of a wire message; the same constant is reused as the event name emitted by Room for the corresponding server message.

    Type Declaration

    • ReadonlyBroadcast: "broadcast"

      Fan-out message delivered to every peer subscribed to a named channel.

    • ReadonlyError: "error"

      Server-reported error carrying a machine code and human-readable message.

    • ReadonlyKicked: "kicked"

      The local peer was forcibly removed from the room by the server.

    • ReadonlyPeerJoined: "peer-joined"

      A remote peer joined the room.

    • ReadonlyPeerLeft: "peer-left"

      A remote peer left the room.

    • ReadonlyPing: "ping"

      Server keep-alive request; answered automatically with MessageType.Pong.

    • ReadonlyPong: "pong"

      Client keep-alive reply to a MessageType.Ping.

    • ReadonlyPresenceOffline: "presence-offline"

      A known peer went offline (lost its connection but has not left).

    • ReadonlyPresenceOnline: "presence-online"

      A known peer came online (regained its connection).

    • ReadonlyRoleChanged: "role-changed"

      A peer's role changed.

    • ReadonlyRoomJoined: "room-joined"

      Server confirms the local peer has joined a room; carries the roster, roles, metadata and ICE servers.

    • ReadonlySignal: "signal"

      Directed peer-to-peer signaling payload (e.g. SDP/ICE), routed via the server.

    Ping/Pong are handled internally by WebSocketTransport as a keep-alive and never surface to application code.