From: Ben Darnell Date: Thu, 7 Aug 2014 02:48:20 +0000 (-0400) Subject: Start the next-release notes doc. X-Git-Tag: v4.1.0b1~116 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c288edb6a54e498ad6bb24574966b102986c7902;p=thirdparty%2Ftornado.git Start the next-release notes doc. --- diff --git a/docs/releases.rst b/docs/releases.rst index edb4223ad..4dba891ac 100644 --- a/docs/releases.rst +++ b/docs/releases.rst @@ -4,6 +4,7 @@ Release notes .. toctree:: :maxdepth: 2 + releases/next releases/v4.0.0 releases/v3.2.2 releases/v3.2.1 diff --git a/docs/websocket.rst b/docs/websocket.rst index 9e1aca8c2..d5e7921bc 100644 --- a/docs/websocket.rst +++ b/docs/websocket.rst @@ -23,6 +23,7 @@ ------------- .. automethod:: WebSocketHandler.check_origin + .. automethod:: WebSocketHandler.get_compression_options .. automethod:: WebSocketHandler.set_nodelay Other diff --git a/tornado/websocket.py b/tornado/websocket.py index 601443222..a9cfbce21 100644 --- a/tornado/websocket.py +++ b/tornado/websocket.py @@ -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()