matssocket
Version:
MatsSocket client library
120 lines • 4.45 kB
TypeScript
/**
* Fractional milliseconds for high-res timing.
*/
export type FractionalMillis = number;
/**
* Timestamp, millis-since-epoch.
*/
export type Timestamp = number;
/**
* Meta-information for the call, availability depends on the allowed debug options for the authenticated user,
* and which information is requested in client. Notice that Client side and Server side might have wildly differing
* ideas of what the time is, which means that timestamps comparison between Server and Client must be evaluated
* with massive interpretation.
*
* @param {Timestamp} clientMessageSent
* @param {number} requestedDebugOptions
* @param {object} envelope
* @param {Timestamp} receivedTimestamp
* @class
*/
export function DebugInformation(clientMessageSent: Timestamp, requestedDebugOptions: number, envelope: object, receivedTimestamp: Timestamp): void;
export class DebugInformation {
/**
* Meta-information for the call, availability depends on the allowed debug options for the authenticated user,
* and which information is requested in client. Notice that Client side and Server side might have wildly differing
* ideas of what the time is, which means that timestamps comparison between Server and Client must be evaluated
* with massive interpretation.
*
* @param {Timestamp} clientMessageSent
* @param {number} requestedDebugOptions
* @param {object} envelope
* @param {Timestamp} receivedTimestamp
* @class
*/
constructor(clientMessageSent: Timestamp, requestedDebugOptions: number, envelope: object, receivedTimestamp: Timestamp);
/**
* From client: When the message was sent, millis-from-epoch.
* @type {Timestamp}
*/
clientMessageSent: Timestamp;
/**
* From client: What {@link DebugOption}s (bitfield) was requested by the client of when message was sent.
* @type {number}
*/
requestedDebugOptions: number;
/**
* From server: Description if anything didn't go as expected.
* @type {string}
*/
description: string;
/**
* When this message was received by the client.
* @type {Timestamp}
*/
messageReceived: Timestamp;
/**
* (Only if debug) From server: What {@link DebugOption}s (bitfield) was resolved/given by the server, based on the
* {@link DebugInformation#requestedDebugOptions} and authorization.
* @type {number}
*/
resolvedDebugOptions: number;
/**
* (Only if debug) When the MatsSocket message from the client was received by the MatsSocketServer.
* @type {Timestamp}
*/
clientMessageReceived: Timestamp;
/**
* (Only if debug) Which MatsSocketServer node received (and thus initial-processed) the MatsSocket message.
* @type {string}
*/
clientMessageReceivedNodename: string;
/**
* (Only if debug) When the Mats3 message was sent onto the Mats3 Fabric on server side.
* @type {Timestamp}
*/
matsMessageSent: Timestamp;
/**
* (Only if debug) When the Mats3 reply was received by the MatsSocketServer.
* @type {Timestamp}
*/
matsMessageReplyReceived: Timestamp;
/**
* (Only if debug) Which MatsSocketServer node received the reply for the Mats3 message (might not be the same that sent it).
* @type {string}
*/
matsMessageReplyReceivedNodename: string;
/**
* (Only if debug) When the MatsSocket message was produced on the server side.
* @type {Timestamp}
*/
serverMessageCreated: Timestamp;
/**
* (Only if debug) Which MatsSocketServer node created the MatsSocket message.
* @type {string}
*/
serverMessageCreatedNodename: string;
/**
* (Only if debug) When the MatsSocket message was sent from server to client.
* @type {Timestamp}
*/
messageSentToClient: Timestamp;
/**
* (Only if debug) Which MatsSocketServer node sent the MatsSocket message to the client (the one that held the
* MatsSocket session at the sending time. This might be different from the MatsSocketServer node that held the
* session at the receiving time).
* @type {string}
*/
messageSentToClientNodename: string;
}
/**
* *
*/
export type DebugOption = number;
export namespace DebugOption {
let TIMESTAMPS: number;
let NODES: number;
let CUSTOM_A: number;
let CUSTOM_B: number;
}
//# sourceMappingURL=DebugInformation.d.ts.map