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

Function get_host_port

tests/asyncio/server.py:6–10  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

4
5
6def get_host_port(server):
7 for sock in server.sockets:
8 if sock.family == socket.AF_INET: # pragma: no branch
9 return sock.getsockname()
10 raise AssertionError("expected at least one IPv4 socket")
11
12
13def get_uri(server, secure=None):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…