Commit 8f51eb1a authored by StevenWdV's avatar StevenWdV

Fixed bugs in managing the sent_ack_buffer. Made closing work with FIN 'n...

Fixed bugs in managing the sent_ack_buffer. Made closing work with FIN 'n stuff. Fixed timing bug in regarding lost packets. Added dequeue_data_array. Decreased default poll time. Added view of sent_ack_buffer for debugging.
parent bb9935cc
......@@ -25,5 +25,4 @@ file.close()
connection.send(struct.pack("!Q", len(data)))
connection.send(data)
input("press enter to stop\n")
binding.close()
......@@ -21,12 +21,14 @@ server = binding.bind_server(0)
server.start_listen(1)
connection = server.accept()
connection.close_sender()
file_size: int = struct.unpack("!Q", connection.receive(8))[0]
file = open(args.output, "w+b")
data = connection.receive(file_size)
file.write(data)
data = connection.receive_array(file_size)
for block in data:
file.write(block)
file.close()
binding.close()
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment