]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Start the next-release notes doc.
authorBen Darnell <ben@bendarnell.com>
Thu, 7 Aug 2014 02:48:20 +0000 (22:48 -0400)
committerBen Darnell <ben@bendarnell.com>
Thu, 7 Aug 2014 02:48:20 +0000 (22:48 -0400)
docs/releases.rst
docs/websocket.rst
tornado/websocket.py

index edb4223adea49861ff05bf2c6ded5169452eef80..4dba891ac8f24f3bf83ce9fe87f37bc470d756fe 100644 (file)
@@ -4,6 +4,7 @@ Release notes
 .. toctree::
    :maxdepth: 2
 
+   releases/next
    releases/v4.0.0
    releases/v3.2.2
    releases/v3.2.1
index 9e1aca8c2f3c7d271c5294d8c244be925dcb57f9..d5e7921bca274c5d60b9e99a6142fd20aa62e1f3 100644 (file)
@@ -23,6 +23,7 @@
    -------------
 
    .. automethod:: WebSocketHandler.check_origin
+   .. automethod:: WebSocketHandler.get_compression_options
    .. automethod:: WebSocketHandler.set_nodelay
 
    Other
index 60144322243ff8a8ec2cf749ee944f8803459f59..a9cfbce21fef28765f4410c7100489522744a7cf 100644 (file)
@@ -216,6 +216,16 @@ class WebSocketHandler(tornado.web.RequestHandler):
         return None
 
     def get_compression_options(self):
+        """Override to return compression options for the connection.
+
+        If this method returns None (the default), compression will
+        be disabled.  If it returns a dict (even an empty one), it
+        will be enabled.  The contents of the dict may be used to
+        control the memory and CPU usage of the compression,
+        but no such options are currently implemented.
+
+        .. versionadded:: 4.1
+        """
         return None
 
     def open(self):
@@ -960,8 +970,14 @@ def websocket_connect(url, io_loop=None, callback=None, connect_timeout=None,
     Takes a url and returns a Future whose result is a
     `WebSocketClientConnection`.
 
+    ``compression_options`` is interpreted in the same way as the
+    return value of `.WebSocketHandler.get_compression_options`.
+
     .. versionchanged:: 3.2
        Also accepts ``HTTPRequest`` objects in place of urls.
+
+    .. versionchanged:: 4.1
+       Added ``compression_options``.
     """
     if io_loop is None:
         io_loop = IOLoop.current()