tornadio2.router
Transport protocol router and main entry point for all socket.io clients.
-
class tornadio2.router.TornadioRouter(connection, user_settings={}, namespace='socket.io', io_loop=None)[source]
TornadIO2 router implementation
Public
-
TornadioRouter.__init__(connection, user_settings={}, namespace='socket.io', io_loop=None)[source]
Constructor.
- connection
- SocketConnection class instance
- user_settings
- Settings
- namespace
- Router namespace, defaulted to ‘socket.io’
- io_loop
- IOLoop instance, optional.
-
TornadioRouter.urls[source]
List of the URLs to be added to the Tornado application
-
TornadioRouter.apply_routes(routes)[source]
Feed list of the URLs to the routes list. Returns list
Sessions
-
TornadioRouter.create_session(request)[source]
Creates new session object and returns it.
- request
- Request that created the session. Will be used to get query string
parameters and cookies.
-
TornadioRouter.get_session(session_id)[source]
Get session by session id