Setu-TS
    Preparing search index...

    Interface RealtimeFrame

    One broadcast crossing the backplane.

    Every field is JSON-serializable, because the transports agree on nothing richer: a message broker hands the payload to a serializer, and Redis pub/sub carries strings.

    0.2.0

    interface RealtimeFrame {
        binary?: boolean;
        data: string;
        exceptId?: string;
        kind: RealtimeFrameKind;
        name: string;
        origin: string;
    }
    Index
    binary?: boolean

    True when RealtimeFrame.data is base64-encoded binary.

    data: string

    The payload, always a string.

    A WebSocket binary frame is base64-encoded and flagged by RealtimeFrame.binary; an SSE message is its JSON encoding.

    exceptId?: string

    The connection excluded from this broadcast, by ID.

    RoomBroadcastOptions.except names a live connection object, which has no meaning in another process — but connection IDs come from runtime.uuid() and are therefore globally unique, so carrying the ID is what lets the exclusion survive the wire. A receiving replica skips the member whose id matches; ordinarily none does, since the excluded peer is connected to the originating replica.

    Absent for SSE channels, whose publish has no exclusion option.

    0.2.0

    Which consumer the frame belongs to.

    name: string

    The room or channel name the frame addresses.

    origin: string

    The publishing instance's identity.

    A subscriber drops frames carrying its own origin. Without this a two-node cluster would echo every broadcast back and forth forever.