tornadio2.session¶
Session¶
tornadio2.session¶
Active TornadIO2 connection session.
-
class
tornadio2.session.Session(conn, server, request, expiry=None)[source]¶ Socket.IO session implementation.
Session has some publicly accessible properties:
- server
- Server association. Server contains io_loop instance, settings, etc.
- remote_ip
- Remote IP
- is_closed
- Check if session is closed or not.
Constructor¶
Callbacks¶
Handlers¶
Output¶
State¶
-
Session.close(endpoint=None)[source]¶ Close session or endpoint connection.
- endpoint
- If endpoint is passed, will close open endpoint connection. Otherwise will close whole socket.
-
Session.is_closed¶ Check if session was closed
Heartbeats¶
Endpoints¶
Messages¶
Connection information¶
-
class
tornadio2.session.ConnectionInfo(ip, arguments, cookies)[source]¶ Connection information object.
Will be passed to the
on_openhandler of your connection class.Has few properties:
- ip
- Caller IP address
- cookies
- Collection of cookies
- arguments
- Collection of the query string arguments
Return single cookie by its name