MCPcopy Create free account
hub / github.com/rthalley/dnspython / _source_tuple

Function _source_tuple

dns/asyncquery.py:66–79  ·  view source on GitHub ↗
(af, address, port)

Source from the content-addressed store, hash-verified

64
65
66def _source_tuple(af, address, port):
67 # Make a high level source tuple, or return None if address and port
68 # are both None
69 if address or port:
70 if address is None:
71 if af == socket.AF_INET:
72 address = "0.0.0.0"
73 elif af == socket.AF_INET6:
74 address = "::"
75 else:
76 raise NotImplementedError(f"unknown address family {af}")
77 return (address, port)
78 else:
79 return None
80
81
82def _timeout(expiration, now=None):

Callers 4

udpFunction · 0.85
tcpFunction · 0.85
tlsFunction · 0.85
inbound_xfrFunction · 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…