Sessions for client-server communication - mushroom.sessions¶
-
class
mushroom.session.
Session
(id, transport, rpc_handler)¶ -
notify
(*args, **kwargs)¶ Send a notification to the connected client.
This method is just a wrapper for the
mushroom.rpc.Engine.request()
method and uses the same arguments.
-
request
(*args, **kwargs)¶ Send a request to the connected client.
This method is just a wrapper for the
mushroom.rpc.Engine.notify()
method and uses the same arguments.
-
-
class
mushroom.session.
SessionHandler
¶ -
authenticate
(session, auth)¶
-
connect
(session)¶
-
disconnect
(session)¶
-
-
class
mushroom.session.
SessionHandlerAdapter
(obj, prefix='session_', suffix='')¶
-
class
mushroom.session.
SessionList
¶ List of sessions which provides a convenient notify() method to notify all sessions. This list also implements copy-on-write (COW) so calls to add() and remove() are possible during a notify() call.
-
add
(session)¶
-
notify
(method, data=None)¶
-
remove
(session)¶
-
-
mushroom.session.
session_id_generator
()¶