aiocoap.util.pyodide_websockets module¶
This module provides a slimmed-down replacement of the websockets module
(that regularly powers aiocoap.transports.ws) – but implemented through
pyodide’s JavaScript adapter towards the WebSocket module of the hosting
browser. It aims to be a drop-in replacement that provides the parts that can
be implemented in the browser, and to provide practical errors on the used
entry points. It will not go out of its way to mimic every aspect of the
websockets module, but restrain itself to what .ws needs.
Future development: The module can probably be extended to cover all the implementable functionality of websockets, and provide meaningful errors on all its items. When that happens, it should be split out of aiocoap.
- async aiocoap.util.pyodide_websockets.connect(uri, subprotocols=None, ping_interval=20, ssl=None) Connection¶