]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Doc updates
authorBen Darnell <ben@bendarnell.com>
Mon, 23 Jan 2012 01:52:43 +0000 (17:52 -0800)
committerBen Darnell <ben@bendarnell.com>
Mon, 23 Jan 2012 01:52:43 +0000 (17:52 -0800)
tornado/websocket.py
website/sphinx/web.rst
website/sphinx/websocket.rst

index 273dbc183c4b52e5eb4a36d475b633a839bf6c24..8aa777716051ca5f9e440c06d9d25a6abc2aaae3 100644 (file)
@@ -153,8 +153,13 @@ class WebSocketHandler(tornado.web.RequestHandler):
         """
         return None
 
-    def open(self, *args, **kwargs):
-        """Invoked when a new WebSocket is opened."""
+    def open(self):
+        """Invoked when a new WebSocket is opened.
+
+        The arguments to `open` are extracted from the `tornado.web.URLSpec`
+        regular expression, just like the arguments to
+        `tornado.web.RequestHandler.get`.
+        """
         pass
 
     def on_message(self, message):
@@ -206,7 +211,8 @@ class WebSocketHandler(tornado.web.RequestHandler):
         """Wrap callbacks with this if they are used on asynchronous requests.
 
         Catches exceptions properly and closes this WebSocket if an exception
-        is uncaught.
+        is uncaught.  (Note that this is usually unnecessary thanks to
+        `tornado.stack_context`)
         """
         return self.ws_connection.async_callback(callback, *args, **kwargs)
 
index 266ababab06da99de1b261a3bf5b7cea68cb4c9e..55d69a2a603671ac281c1b9d3dfb47535ca06db4 100644 (file)
@@ -12,6 +12,7 @@
    
    .. automethod:: RequestHandler.initialize
    .. automethod:: RequestHandler.prepare
+   .. automethod:: RequestHandler.on_finish
 
    Implement any of the following methods to handle the corresponding
    HTTP method.
index 7da05071f3a8626879b11a73244f51f5f296afac..be7bbc542afc0d3926a409415aaae5204904873a 100644 (file)
@@ -4,4 +4,28 @@
 .. automodule:: tornado.websocket
 
    .. autoclass:: WebSocketHandler
-      :members:  
+
+   Event handlers
+   --------------
+
+   .. automethod:: WebSocketHandler.open
+   .. automethod:: WebSocketHandler.on_message
+   .. automethod:: WebSocketHandler.on_close
+   .. automethod:: WebSocketHandler.select_subprotocol
+
+   Output
+   ------
+
+   .. automethod:: WebSocketHandler.write_message
+   .. automethod:: WebSocketHandler.close
+
+   Configuration
+   -------------
+
+   .. automethod:: WebSocketHandler.allow_draft76
+   .. automethod:: WebSocketHandler.get_websocket_scheme
+
+   Other
+   -----
+
+   .. automethod:: WebSocketHandler.async_callback