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

Function _net_write

dns/query.py:1100–1113  ·  view source on GitHub ↗

Write the specified data to the socket. A Timeout exception will be raised if the operation is not completed by the expiration time.

(sock, data, expiration)

Source from the content-addressed store, hash-verified

1098
1099
1100def _net_write(sock, data, expiration):
1101 """Write the specified data to the socket.
1102 A Timeout exception will be raised if the operation is not completed
1103 by the expiration time.
1104 """
1105 current = 0
1106 l = len(data)
1107 while current < l:
1108 try:
1109 current += sock.send(data[current:])
1110 except (BlockingIOError, ssl.SSLWantWriteError):
1111 _wait_for_writable(sock, expiration)
1112 except ssl.SSLWantReadError: # pragma: no cover
1113 _wait_for_readable(sock, expiration)
1114
1115
1116def send_tcp(

Callers 2

send_tcpFunction · 0.85
_inbound_xfrFunction · 0.85

Calls 3

_wait_for_writableFunction · 0.85
_wait_for_readableFunction · 0.85
sendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…