MCPcopy Create free account
hub / github.com/microsoft/debugpy / get_address

Function get_address

src/debugpy/common/sockets.py:52–60  ·  view source on GitHub ↗

Gets the socket address host and port.

(sock)

Source from the content-addressed store, hash-verified

50 return "127.0.0.1"
51
52def get_address(sock):
53 """Gets the socket address host and port."""
54 try:
55 host, port = sock.getsockname()[:2]
56 except Exception as exc:
57 log.swallow_exception("Failed to get socket address:")
58 raise RuntimeError(f"Failed to get socket address: {exc}") from exc
59
60 return host, port
61
62def create_server(host, port=0, backlog=socket.SOMAXCONN, timeout=None):
63 """Return a local server socket listening on the given port."""

Callers 1

serveFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…