Module Contents¶
Classes¶
WAMP application session for asyncio-based applications. |
|
WAMP application session factory for asyncio-based applications. |
|
This class is a convenience tool mainly for development and quick hosting |
- class autobahn.asyncio.wamp.ApplicationSession(config: Optional[autobahn.wamp.types.ComponentConfig] = None)[source]¶
Bases:
autobahn.wamp.protocol.ApplicationSession
WAMP application session for asyncio-based applications.
Implements:
autobahn.wamp.interfaces.ITransportHandler
autobahn.wamp.interfaces.ISession
- log¶
- class autobahn.asyncio.wamp.ApplicationSessionFactory(config=None)[source]¶
Bases:
autobahn.wamp.protocol.ApplicationSessionFactory
WAMP application session factory for asyncio-based applications.
- session :ApplicationSession¶
The application session class this application session factory will use. Defaults to
autobahn.asyncio.wamp.ApplicationSession
.
- log¶
- class autobahn.asyncio.wamp.ApplicationRunner(url, realm=None, extra=None, serializers=None, ssl=None, proxy=None, headers=None)[source]¶
Bases:
object
This class is a convenience tool mainly for development and quick hosting of WAMP application components.
It can host a WAMP application component in a WAMP-over-WebSocket client connecting to a WAMP router.
- log¶
- run(make, start_loop=True, log_level='info')[source]¶
Run the application component. Under the hood, this runs the event loop (unless start_loop=False is passed) so won’t return until the program is done.
- Parameters
make (callable) – A factory that produces instances of
autobahn.asyncio.wamp.ApplicationSession
when called with an instance ofautobahn.wamp.types.ComponentConfig
.start_loop (bool) – When
True
(the default) this method start a new asyncio loop.
- Returns
None is returned, unless you specify start_loop=False in which case the coroutine from calling loop.create_connection() is returned. This will yield the (transport, protocol) pair.