* Pings client every `this.pingInterval` and expects response * within `this.pingTimeout` or closes connection. * * @private
()
| 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. |
no test coverage detected