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

Function _udp_send

dns/query.py:749–761  ·  view source on GitHub ↗

Sends the specified datagram to destination over the socket. A Timeout exception will be raised if the operation is not completed by the expiration time.

(sock, data, destination, expiration)

Source from the content-addressed store, hash-verified

747
748
749def _udp_send(sock, data, destination, expiration):
750 """Sends the specified datagram to destination over the socket.
751 A Timeout exception will be raised if the operation is not completed
752 by the expiration time.
753 """
754 while True:
755 try:
756 if destination:
757 return sock.sendto(data, destination)
758 else:
759 return sock.send(data)
760 except BlockingIOError: # pragma: no cover
761 _wait_for_writable(sock, expiration)
762
763
764def send_udp(

Callers 2

send_udpFunction · 0.85
_inbound_xfrFunction · 0.85

Calls 3

_wait_for_writableFunction · 0.85
sendtoMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…