2011-06-11 21:48:46 +00:00
|
|
|
``tornado.websocket`` --- Bidirectional communication to the browser
|
|
|
|
====================================================================
|
2011-06-09 06:58:58 +00:00
|
|
|
|
2015-02-09 05:19:47 +00:00
|
|
|
.. testsetup::
|
|
|
|
|
|
|
|
import tornado.websocket
|
|
|
|
|
2011-06-09 06:58:58 +00:00
|
|
|
.. automodule:: tornado.websocket
|
2012-01-08 08:01:18 +00:00
|
|
|
|
|
|
|
.. autoclass:: WebSocketHandler
|
2012-01-23 01:52:43 +00:00
|
|
|
|
|
|
|
Event handlers
|
|
|
|
--------------
|
|
|
|
|
|
|
|
.. automethod:: WebSocketHandler.open
|
|
|
|
.. automethod:: WebSocketHandler.on_message
|
|
|
|
.. automethod:: WebSocketHandler.on_close
|
|
|
|
.. automethod:: WebSocketHandler.select_subprotocol
|
2018-05-12 18:43:58 +00:00
|
|
|
.. autoattribute:: WebSocketHandler.selected_subprotocol
|
2017-04-10 03:18:31 +00:00
|
|
|
.. automethod:: WebSocketHandler.on_ping
|
2012-01-23 01:52:43 +00:00
|
|
|
|
|
|
|
Output
|
|
|
|
------
|
|
|
|
|
|
|
|
.. automethod:: WebSocketHandler.write_message
|
|
|
|
.. automethod:: WebSocketHandler.close
|
|
|
|
|
|
|
|
Configuration
|
|
|
|
-------------
|
|
|
|
|
2014-06-20 04:37:11 +00:00
|
|
|
.. automethod:: WebSocketHandler.check_origin
|
2014-08-07 02:48:20 +00:00
|
|
|
.. automethod:: WebSocketHandler.get_compression_options
|
2013-05-12 22:08:23 +00:00
|
|
|
.. automethod:: WebSocketHandler.set_nodelay
|
2012-01-23 01:52:43 +00:00
|
|
|
|
|
|
|
Other
|
|
|
|
-----
|
|
|
|
|
2012-09-29 23:57:04 +00:00
|
|
|
.. automethod:: WebSocketHandler.ping
|
|
|
|
.. automethod:: WebSocketHandler.on_pong
|
2013-11-04 02:10:56 +00:00
|
|
|
.. autoexception:: WebSocketClosedError
|
2013-03-15 03:45:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
Client-side support
|
|
|
|
-------------------
|
|
|
|
|
|
|
|
.. autofunction:: websocket_connect
|
|
|
|
.. autoclass:: WebSocketClientConnection
|
|
|
|
:members:
|