matssocket
Version:
MatsSocket client library
43 lines • 1.35 kB
TypeScript
/**
* (Metric) A "holding struct" for pings and their experienced round-trip times - you may "subscribe" to ping results
* using {@link MatsSocket#addPingPongListener()}, and you may get the latest pings from the property
* {@link MatsSocket#pings}.
*
* @param {number} pingId
* @param {number} sentTimestamp
* @class
*/
export function PingPong(pingId: number, sentTimestamp: number): void;
export class PingPong {
/**
* (Metric) A "holding struct" for pings and their experienced round-trip times - you may "subscribe" to ping results
* using {@link MatsSocket#addPingPongListener()}, and you may get the latest pings from the property
* {@link MatsSocket#pings}.
*
* @param {number} pingId
* @param {number} sentTimestamp
* @class
*/
constructor(pingId: number, sentTimestamp: number);
/**
* Sequence of the ping.
*
* @type {number}
*/
pingId: number;
/**
* Millis-from-epoch when this ping was sent.
*
* @type {number}
*/
sentTimestamp: number;
/**
* The experienced round-trip time for this ping-pong - this is the time back-and-forth.
*
* <b>Note that this number can be a float, not necessarily integer</b>.
*
* @type {number}
*/
roundTripMillis: number;
}
//# sourceMappingURL=PingPong.d.ts.map