Skip to content

Commit cbb07df

Browse files
committed
websocket: Small doc updates
- Mention units for ping settings (#2655) - Remove obsolete reference to 30s default timeout - Link to a more recent version of python docs
1 parent 5b349e5 commit cbb07df

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

tornado/websocket.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ def on_close(self):
204204
If the application setting ``websocket_ping_interval`` has a non-zero
205205
value, a ping will be sent periodically, and the connection will be
206206
closed if a response is not received before the ``websocket_ping_timeout``.
207+
Both settings are in seconds; floating point values are allowed.
208+
The default timeout is equal to the interval.
207209
208210
Messages larger than the ``websocket_max_message_size`` application setting
209211
(default 10MiB) will not be accepted.
@@ -308,7 +310,7 @@ def ping_timeout(self) -> Optional[float]:
308310
309311
Set ``websocket_ping_timeout = 0`` to disable the ping timeout.
310312
311-
Default: ``min(ping_interval, 30)``
313+
Default: equal to the ``ping_interval``.
312314
313315
.. versionchanged:: 6.5.0
314316
Default changed from the max of 3 pings or 30 seconds.
@@ -406,8 +408,8 @@ def get_compression_options(self) -> Optional[Dict[str, Any]]:
406408
407409
``mem_level`` specifies the amount of memory used for the internal compression state.
408410
409-
These parameters are documented in details here:
410-
https://docs.python.org/3.6/library/zlib.html#zlib.compressobj
411+
These parameters are documented in detail here:
412+
https://docs.python.org/3.13/library/zlib.html#zlib.compressobj
411413
412414
.. versionadded:: 4.1
413415

0 commit comments

Comments
 (0)