diffusion
Version:
Diffusion JavaScript client
30 lines (29 loc) • 888 B
JavaScript
;
/**
* @module Client.Services
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.monitoredPingService = void 0;
/**
* Service implementation to provide Ping functionality.
*
* Intended to provide basic Ping functionality by immediately responding to a
* received request, by which the round-trip latency between the sender and
* receiver may be ascertained.
*
* This implementation is monitored. It notifies the session activity monitor
* of the ping.
*/
exports.monitoredPingService = {
/**
* Handle an inbound request.
*
* @param internal the internal session instance
* @param request the inbound ping request
* @param callback a service callback to handle the response
*/
onRequest: function (internal, request, callback) {
callback.respond();
internal.onSystemPing();
}
};