]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
websocket: Small doc updates 3483/head
authorBen Darnell <ben@bendarnell.com>
Tue, 22 Apr 2025 17:28:59 +0000 (13:28 -0400)
committerBen Darnell <ben@bendarnell.com>
Tue, 22 Apr 2025 20:42:03 +0000 (16:42 -0400)
- Mention units for ping settings (#2655)
- Remove obsolete reference to 30s default timeout
- Link to a more recent version of python docs

tornado/websocket.py

index 4fbb2da12ab30e46c29e5308f46a45433be0000b..a7089c815a129927d35743aa09849c6ab37475ff 100644 (file)
@@ -204,6 +204,8 @@ class WebSocketHandler(tornado.web.RequestHandler):
     If the application setting ``websocket_ping_interval`` has a non-zero
     value, a ping will be sent periodically, and the connection will be
     closed if a response is not received before the ``websocket_ping_timeout``.
+    Both settings are in seconds; floating point values are allowed.
+    The default timeout is equal to the interval.
 
     Messages larger than the ``websocket_max_message_size`` application setting
     (default 10MiB) will not be accepted.
@@ -308,7 +310,7 @@ class WebSocketHandler(tornado.web.RequestHandler):
 
         Set ``websocket_ping_timeout = 0`` to disable the ping timeout.
 
-        Default: ``min(ping_interval, 30)``
+        Default: equal to the ``ping_interval``.
 
         .. versionchanged:: 6.5.0
            Default changed from the max of 3 pings or 30 seconds.
@@ -406,8 +408,8 @@ class WebSocketHandler(tornado.web.RequestHandler):
 
         ``mem_level`` specifies the amount of memory used for the internal compression state.
 
-         These parameters are documented in details here:
-         https://docs.python.org/3.6/library/zlib.html#zlib.compressobj
+         These parameters are documented in detail here:
+         https://docs.python.org/3.13/library/zlib.html#zlib.compressobj
 
         .. versionadded:: 4.1