Skip to content

Commit

Permalink
Serve inbound Xfers reliably
Browse files Browse the repository at this point in the history
  • Loading branch information
SaladDais committed Jan 5, 2024
1 parent 7b6239d commit a11ef96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions hippolyzer/lib/base/xfer_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,13 @@ async def serve_inbound_xfer_request(
xfer.xfer_id = request_msg["XferID"]["ID"]

packet_id = 0
# TODO: No resend yet. If it's lost, it's lost.
while xfer.chunks:
chunk = xfer.chunks.pop(packet_id)
# EOF if there are no chunks left
packet_val = XferPacket(PacketID=packet_id, IsEOF=not bool(xfer.chunks))
self._connection_holder.circuit.send(Message(
# We just send reliably since I don't care to implement the Xfer-specific
# resend-on-unacked nastiness
_ = self._connection_holder.circuit.send_reliable(Message(
"SendXferPacket",
Block("XferID", ID=xfer.xfer_id, Packet_=packet_val),
Block("DataPacket", Data=chunk),
Expand Down

0 comments on commit a11ef96

Please sign in to comment.