MCPcopy Create free account
hub / github.com/EasyIME/PIME / start_pinging

Method start_pinging

python/python3/tornado/websocket.py:1306–1314  ·  view source on GitHub ↗

Start sending periodic pings to keep the connection alive

(self)

Source from the content-addressed store, hash-verified

1304 return max(3 * self.ping_interval, 30)
1305
1306 def start_pinging(self) -> None:
1307 """Start sending periodic pings to keep the connection alive"""
1308 assert self.ping_interval is not None
1309 if self.ping_interval > 0:
1310 self.last_ping = self.last_pong = IOLoop.current().time()
1311 self.ping_callback = PeriodicCallback(
1312 self.periodic_ping, self.ping_interval * 1000
1313 )
1314 self.ping_callback.start()
1315
1316 def periodic_ping(self) -> None:
1317 """Send a ping to keep the websocket alive

Callers 1

_accept_connectionMethod · 0.95

Calls 4

PeriodicCallbackClass · 0.90
timeMethod · 0.80
currentMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected