Permalink
Browse files

Documentation.

  • Loading branch information...
1 parent 49c0d5a commit 570050c4fc767df1e5050f8c32e4df37408e644d @mrjoes committed Nov 14, 2011
View
@@ -1,17 +1,20 @@
-=====
API
=====
-.. module:: tornadio2.conn
-
-Connection API
---------------
-
-.. _api-socketconnection:
-.. autoclass:: tornadio2.conn.SocketConnection
-
-If you need more
-----------------
+API documentation
+-----------------
+.. toctree::
+ :maxdepth: 2
-.. _api-socketserver:
-.. autoclass:: tornadio2.router.TornadioRouter
+ mod_conn
+ mod_flashserver
+ mod_gen
+ mod_periodic
+ mod_persistent
+ mod_polling
+ mod_preflight
+ mod_proto
+ mod_router
+ mod_server
+ mod_session
+ mod_sessioncontainer
View
@@ -25,7 +25,7 @@
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.ifconfig']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
View
@@ -14,7 +14,7 @@ Topics
------
.. toctree::
- :maxdepth: 1
+ :maxdepth: 2
migrating
multiplexed
View
@@ -0,0 +1,45 @@
+``tornadio2.conn``
+==================
+
+Connection
+----------
+
+.. automodule:: tornadio2.conn
+
+ .. autoclass:: SocketConnection
+
+ Callbacks
+ ^^^^^^^^^
+
+ .. automethod:: SocketConnection.on_open
+ .. automethod:: SocketConnection.on_message
+ .. automethod:: SocketConnection.on_event
+ .. automethod:: SocketConnection.on_close
+
+ Output
+ ^^^^^^
+
+ .. automethod:: SocketConnection.send
+ .. automethod:: SocketConnection.emit
+ .. automethod:: SocketConnection.emit_ack
+
+ Management
+ ^^^^^^^^^^
+
+ .. automethod:: SocketConnection.close
+
+ Endpoint management
+ ^^^^^^^^^^^^^^^^^^^
+
+ .. automethod:: SocketConnection.get_endpoint
+
+ Other
+ ^^^^^
+
+ .. automethod:: SocketConnection.deque_ack
+
+
+Events
+------
+
+.. autofunction:: tornadio2.conn.event
View
@@ -0,0 +1,8 @@
+``tornadio2.flashserver``
+=========================
+
+.. automodule:: tornadio2.flashserver
+
+ .. autoclass:: FlashPolicyServer
+
+ .. automethod:: FlashPolicyServer.__init__
View
@@ -0,0 +1,16 @@
+``tornadio2.gen``
+=================
+
+.. automodule:: tornadio2.gen
+
+Wrapper
+-------
+
+ .. autofunction:: sync_engine
+
+Internal API
+------------
+
+ .. autoclass:: SyncRunner
+
+ .. automethod:: SyncRunner.__init__
View
@@ -0,0 +1,12 @@
+``tornadio2.periodic``
+======================
+
+.. automodule:: tornadio2.periodic
+
+ .. autoclass:: Callback
+
+ .. automethod:: __init__
+ .. automethod:: calculate_next_run
+ .. automethod:: start
+ .. automethod:: stop
+ .. automethod:: delay
View
@@ -0,0 +1,25 @@
+``tornadio2.persistent``
+========================
+
+Persistent transports
+---------------------
+
+.. automodule:: tornadio2.persistent
+
+ .. autoclass:: TornadioWebSocketHandler
+
+ Callbacks
+ ^^^^^^^^^
+
+ .. automethod:: TornadioWebSocketHandler.open
+ .. automethod:: TornadioWebSocketHandler.on_message
+ .. automethod:: TornadioWebSocketHandler.on_close
+
+ .. automethod:: TornadioWebSocketHandler.session_closed
+
+ Output
+ ^^^^^^
+
+ .. automethod:: TornadioWebSocketHandler.send_messages
+
+ .. autoclass:: TornadioFlashSocketHandler
View
@@ -0,0 +1,37 @@
+``tornadio2.polling``
+=====================
+
+.. automodule:: tornadio2.polling
+
+ .. autoclass:: TornadioPollingHandlerBase
+
+ Request
+ ^^^^^^^
+
+ .. automethod:: TornadioPollingHandlerBase.get
+ .. automethod:: TornadioPollingHandlerBase.post
+
+ Callbacks
+ ^^^^^^^^^
+
+ .. automethod:: TornadioPollingHandlerBase.session_closed
+ .. automethod:: TornadioPollingHandlerBase.on_connection_close
+
+ Output
+ ^^^^^^
+
+ .. automethod:: TornadioPollingHandlerBase.send_messages
+
+
+ Sessions
+ ^^^^^^^^
+
+ .. automethod:: TornadioPollingHandlerBase._get_session
+ .. automethod:: TornadioPollingHandlerBase._detach
+
+
+ .. autoclass:: TornadioXHRPollingHandler
+
+ .. autoclass:: TornadioHtmlFileHandler
+
+ .. autoclass:: TornadioJSONPHandler
View
@@ -0,0 +1,10 @@
+``tornadio2.preflight``
+=======================
+
+.. automodule:: tornadio2.preflight
+
+ .. autoclass:: PreflightHandler
+
+ .. automethod:: options
+ .. automethod:: preflight
+
View
@@ -0,0 +1,29 @@
+``tornadio2.proto``
+===================
+
+.. automodule:: tornadio2.proto
+
+ Packets
+ ^^^^^^^
+
+ .. autofunction:: disconnect
+ .. autofunction:: connect
+ .. autofunction:: heartbeat
+ .. autofunction:: message
+ .. autofunction:: event
+ .. autofunction:: ack
+ .. autofunction:: error
+ .. autofunction:: noop
+
+ JSON
+ ^^^^
+
+ .. autofunction:: json_dumps
+ .. autofunction:: json_load
+
+ Frames
+ ^^^^^^
+
+ .. autofunction:: decode_frames
+ .. autofunction:: encode_frames
+
View
@@ -0,0 +1,19 @@
+``tornadio2.router``
+====================
+
+.. automodule:: tornadio2.router
+
+ .. autoclass:: TornadioRouter
+
+ Public
+ ^^^^^^
+
+ .. automethod:: TornadioRouter.__init__
+ .. automethod:: TornadioRouter.urls
+ .. automethod:: TornadioRouter.apply_routes
+
+ Sessions
+ ^^^^^^^^
+
+ .. automethod:: TornadioRouter.create_session
+ .. automethod:: TornadioRouter.get_session
View
@@ -0,0 +1,8 @@
+``tornadio2.server``
+====================
+
+.. automodule:: tornadio2.server
+
+ .. autoclass:: SocketServer
+
+ .. automethod:: __init__
View
@@ -0,0 +1,69 @@
+``tornadio2.session``
+=====================
+
+Session
+-------
+
+.. automodule:: tornadio2.session
+
+ .. autoclass:: Session
+
+ Constructor
+ ^^^^^^^^^^^
+
+ .. automethod:: Session.__init__
+
+ Callbacks
+ ^^^^^^^^^
+
+ .. automethod:: Session.on_delete
+
+ Handlers
+ ^^^^^^^^
+
+ .. automethod:: Session.set_handler
+ .. automethod:: Session.remove_handler
+
+ Output
+ ^^^^^^
+
+ .. automethod:: Session.send_message
+ .. automethod:: Session.flush
+
+ State
+ ^^^^^
+
+ .. automethod:: Session.close
+ .. autoattribute:: Session.is_closed
+
+ Heartbeats
+ ^^^^^^^^^^
+
+ .. automethod:: Session.reset_heartbeat
+ .. automethod:: Session.stop_heartbeat
+ .. automethod:: Session.delay_heartbeat
+ .. automethod:: Session._heartbeat
+
+ Endpoints
+ ^^^^^^^^^
+
+ .. automethod:: Session.connect_endpoint
+ .. automethod:: Session.disconnect_endpoint
+
+ Messages
+ ^^^^^^^^
+
+ .. automethod:: Session.raw_message
+
+
+ Connection information
+ ----------------------
+
+ .. autoclass:: ConnectionInfo
+
+ .. autoattribute: ip
+ .. autoattribute: cookies
+ .. autoattribute: arguments
+
+ .. automethod:: get_argument
+ .. automethod:: get_cookie
@@ -0,0 +1,19 @@
+``tornadio2.sessioncontainer``
+==============================
+
+.. automodule:: tornadio2.sessioncontainer
+
+ .. autoclass:: SessionBase
+
+ .. automethod:: __init__
+ .. automethod:: is_alive
+ .. automethod:: promote
+
+ .. automethod:: on_delete
+
+ .. autoclass:: SessionContainer
+
+ .. automethod:: add
+ .. automethod:: get
+ .. automethod:: remove
+ .. automethod:: expire
Oops, something went wrong.

0 comments on commit 570050c

Please sign in to comment.