MCPcopy
hub / github.com/socketio/socket.io / schedulePing

Method schedulePing

packages/engine.io/lib/socket.ts:212–221  ·  view source on GitHub ↗

* Pings client every `this.pingInterval` and expects response * within `this.pingTimeout` or closes connection. * * @private

()

Source from the content-addressed store, hash-verified

210 * @private
211 */
212 private schedulePing() {
213 this.pingIntervalTimer = setTimeout(() => {
214 debug(
215 "writing ping packet - expecting pong within %sms",
216 this.server.opts.pingTimeout,
217 );
218 this.sendPacket("ping");
219 this.resetPingTimeout();
220 }, this.server.opts.pingInterval);
221 }
222
223 /**
224 * Resets ping timeout.

Callers 1

onOpenMethod · 0.95

Calls 3

sendPacketMethod · 0.95
resetPingTimeoutMethod · 0.95
debugFunction · 0.85

Tested by

no test coverage detected