MCPcopy Index your code
hub / github.com/python-websockets/websockets / get_uri

Function get_uri

tests/sync/server.py:10–15  ·  view source on GitHub ↗
(server, secure=None)

Source from the content-addressed store, hash-verified

8
9
10def get_uri(server, secure=None):
11 if secure is None:
12 secure = isinstance(server.socket, ssl.SSLSocket) # hack
13 protocol = "wss" if secure else "ws"
14 host, port = server.socket.getsockname()
15 return f"{protocol}://{host}:{port}"
16
17
18def handler(ws):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…