autobahn.rawsocket.util¶
Functions¶
|
Create a RawSocket URL from components. |
|
Parses as RawSocket URL into it's components and returns a tuple: |
Module Contents¶
- create_url(hostname, port=None, isSecure=False)[source]¶
Create a RawSocket URL from components.
- Parameters:
hostname (str) – RawSocket server hostname (for TCP/IP sockets) or filesystem path (for Unix domain sockets).
port (int or str) – For TCP/IP sockets, RawSocket service port or
None(to select default ports80or443depending onisSecure. Whenhostname=="unix", this defines the path to the Unix domain socket instead of a TCP/IP network socket.isSecure (bool) – Set
Truefor secure RawSocket (rssscheme).
- Returns:
Constructed RawSocket URL.
- Return type:
- parse_url(url)[source]¶
Parses as RawSocket URL into it’s components and returns a tuple:
isSecureis a flag which isTrueforrssURLs.hostis the hostname or IP from the URL.
and for TCP/IP sockets:
tcp_portis the port from the URL or standard port derived from scheme (rs=>80,rss=>443).
or for Unix domain sockets:
uds_pathis the path on the local host filesystem.