Type alias SocketRequest<T, R>

SocketRequest<T, R>: {
    clientCommand?: Sk<R>;
    clientId?: string;
    clientMessageID?: string;
    content?: T;
    originSocket?: string;
    serverCommand?: string;
    serverMessageID?: string;
    timestamp: number;
}

Standard format containing information about a received or sent WebSocket request.

Type Parameters

Type declaration

  • Optional clientCommand?: Sk<R>

    The name of the handler function of the TocketClientBase that should process this request when receiving it.

  • Optional clientId?: string

    unique ID generated when the TocketServer sent this message

  • Optional clientMessageID?: string

    whens sending, unique ID generated when the TocketClientBase sent this message, usually echoed back by the Client when responding.

  • Optional content?: T

    content of the message.

  • Optional originSocket?: string

    name of the WebSocket connection this sent this request

  • Optional serverCommand?: string

    The name of the handler function of the TocketServer that should process this message when receiving it.

  • Optional serverMessageID?: string

    when receiving, unique ID generated when the TocketServer sent this message, usually echoed back to the server when replying.

  • timestamp: number

    timestamp of when the message was sent

Generated using TypeDoc