kaven-utils - v6.1.9
    Preparing search index...

    Interface IRelayMessage

    A message exchanged between the relay server and its clients.

    Messages use a versioned, length-prefixed hybrid wire format. Control messages use JSON, while tunnel data carries raw bytes.

    interface IRelayMessage {
        connectionId?: string;
        data?: unknown;
        from?: string;
        to?: string;
        type: RelayMessageType;
    }
    Index
    connectionId?: string

    Connection identifier for tunnel messages. See RelayMessageType.Tunnel.

    data?: unknown

    Application payload. Control-message payloads must be JSON-serializable; tunnel data uses a Buffer.

    from?: string

    ID of the client that authored the message. Set by the server for inbound messages and by the client for outbound ones.

    to?: string

    ID of the destination client. When omitted on a data message the server will broadcast it to every other connected client. Ignored for broadcast, join, leave, welcome and error messages.

    The kind of message.