Interface Message

interface Message {
    command?: FudgeNet.COMMAND;
    content?: {
        [key: string]: any;
    };
    idRoom?: string;
    idSource?: string;
    idTarget?: string;
    route?: FudgeNet.ROUTE;
    timeSender?: number;
    timeServer?: number;
}

Properties

command?: FudgeNet.COMMAND

the command the message is supposed to trigger

content?: {
    [key: string]: any;
}

the actual content of the message as a simple javascript object like a FUDGE-Mutator

Type declaration

  • [key: string]: any
idRoom?: string

the command the message is supposed to trigger

idSource?: string

the id of the client sending the message, undefined for server. Automatically inserted by dispatch-method

idTarget?: string

the id of the intended recipient of the message, undefined for messages to the server or to all

route?: FudgeNet.ROUTE

the route the message is supposed to take, undefined for peers

timeSender?: number

the timestamp of the sender. Automatically set by dispatch-method

timeServer?: number

the timestamp of the server sending or passing this message. Automatically set by dispatch- or pass-method