From 1faa6f977caf323c9e4c52ed18532809a9fbb0e9 Mon Sep 17 00:00:00 2001 From: Salad Dais Date: Fri, 10 Dec 2021 13:41:20 +0000 Subject: [PATCH] Update docs on send() and send_reliable() --- hippolyzer/lib/base/message/circuit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hippolyzer/lib/base/message/circuit.py b/hippolyzer/lib/base/message/circuit.py index dc4f9be..4425859 100644 --- a/hippolyzer/lib/base/message/circuit.py +++ b/hippolyzer/lib/base/message/circuit.py @@ -69,7 +69,7 @@ class Circuit: def send(self, message: Message, transport=None) -> UDPPacket: if self.prepare_message(message): - # If we injected the message then we're responsible for resends. + # If the message originates from us then we're responsible for resends. if message.reliable and message.synthetic: self.unacked_reliable[(message.direction, message.packet_id)] = ReliableResendInfo( last_resent=dt.datetime.now(), @@ -81,6 +81,7 @@ class Circuit: send_message = send def send_reliable(self, message: Message, transport=None) -> asyncio.Future: + """send() wrapper that always sends reliably and allows `await`ing ACK receipt""" if not message.synthetic: raise ValueError("Not able to send non-synthetic message reliably!") message.send_flags |= PacketFlags.RELIABLE