Module autobahn.rawsocket¶
WAMP-RawSocket is an alternative WAMP transport that has less overhead compared to WebSocket, and is vastly simpler to implement. It can run over any stream based underlying transport, such as TCP or Unix domain socket. However, it does NOT run into the browser.
RawSocket Utilities¶
RawSocket utilities that do not depend on the specific networking framework being used (Twisted or asyncio).
-
autobahn.rawsocket.util.create_url(hostname, port=None, isSecure=False)[source]¶ Create a RawSocket URL from components.
Parameters: Returns: Constructed RawSocket URL.
Return type:
-
autobahn.rawsocket.util.parse_url(url)[source]¶ Parses as RawSocket URL into it’s components and returns a tuple (isSecure, host, port).
isSecureis a flag which isTrueforrssURLs.hostis the hostname or IP from the URL.portis the port from the URL or standard port derived from scheme (rs=>80,rss=>443).
Parameters: url (str) – A valid RawSocket URL, i.e. rs://localhost:9000Returns: A tuple (isSecure, host, port).Return type: tuple