summaryrefslogtreecommitdiff
path: root/dns/asyncquery.py
diff options
context:
space:
mode:
authorBob Halley <halley@dnspython.org>2020-06-12 07:39:04 -0700
committerBob Halley <halley@dnspython.org>2020-06-12 07:39:04 -0700
commit90cb629c04ce5e424ea145c5e76e3f8b4c4d7334 (patch)
treed680bf9b11c19dc594c82a3c2eb617e1236816ba /dns/asyncquery.py
parenteedbdd2bf6cd5bdee22fcfc1c41105ee57e87b45 (diff)
downloaddnspython-90cb629c04ce5e424ea145c5e76e3f8b4c4d7334.tar.gz
read_exactly -> _read_exactly
Diffstat (limited to 'dns/asyncquery.py')
-rw-r--r--dns/asyncquery.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/dns/asyncquery.py b/dns/asyncquery.py
index b9f7212..47a4ff0 100644
--- a/dns/asyncquery.py
+++ b/dns/asyncquery.py
@@ -300,7 +300,7 @@ async def send_tcp(sock, what, expiration=None):
return (len(tcpmsg), sent_time)
-async def read_exactly(sock, count, expiration):
+async def _read_exactly(sock, count, expiration):
"""Read the specified number of bytes from stream. Keep trying until we
either get the desired amount, or we hit EOF.
"""
@@ -340,9 +340,9 @@ async def receive_tcp(sock, expiration=None, one_rr_per_rrset=False,
Returns a ``dns.message.Message`` object.
"""
- ldata = await read_exactly(sock, 2, expiration)
+ ldata = await _read_exactly(sock, 2, expiration)
(l,) = struct.unpack("!H", ldata)
- wire = await read_exactly(sock, l, expiration)
+ wire = await _read_exactly(sock, l, expiration)
received_time = time.time()
r = dns.message.from_wire(wire, keyring=keyring, request_mac=request_mac,
one_rr_per_rrset=one_rr_per_rrset,