MCPcopy
hub / github.com/tornadoweb/tornado / ping_timeout

Method ping_timeout

tornado/websocket.py:298–320  ·  view source on GitHub ↗

Timeout if no pong is received in this many seconds. To be used in combination with ``websocket_ping_interval > 0``. If a ping response (a "pong") is not received within ``websocket_ping_timeout`` seconds, then the websocket connection will be closed. This c

(self)

Source from the content-addressed store, hash-verified

296
297 @property
298 def ping_timeout(self) -> Optional[float]:
299 """Timeout if no pong is received in this many seconds.
300
301 To be used in combination with ``websocket_ping_interval > 0``.
302 If a ping response (a "pong") is not received within
303 ``websocket_ping_timeout`` seconds, then the websocket connection
304 will be closed.
305
306 This can help to clean up clients which have disconnected without
307 cleanly closing the websocket connection.
308
309 Note, the ping timeout cannot be longer than the ping interval.
310
311 Set ``websocket_ping_timeout = 0`` to disable the ping timeout.
312
313 Default: equal to the ``ping_interval``.
314
315 .. versionchanged:: 6.5.0
316 Default changed from the max of 3 pings or 30 seconds.
317 The ping timeout can no longer be configured longer than the
318 ping interval.
319 """
320 return self.settings.get("websocket_ping_timeout", None)
321
322 @property
323 def max_message_size(self) -> int:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected