Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Could someone give me a Python code dealing with a reliable data transfer? I don

ID: 3889579 • Letter: C

Question

Could someone give me a Python code dealing with a reliable data transfer? I don't know how to code with multi-threading. Suppose I have a file of 256 bytes, and sequence number and ack number start at 0. Pseudo-code is below. Thanks

/*Assume sender is not constrained by TCP flow or congestion control, that data from above is less than MSS in size, and that data transfer is in one direction only. * NextSeqNum=InitialsegNumber SendBase-InitialSeqNumber loop (forever) switch(event) event: data received from application above create TCP segment with sequence number NextsegNum if (timer currently not running) start timer pass segment to IP NextSeqNum=NextSeqNum+length ( data ) break; event: timer timeout retransmit not-yet-acknowledged segment with smallest sequence number start timer break; event: ACK received, with ACK field value of y if (y SendBase) f SendBase-y if (there are currently any not-yet-acknowledged segments) start timer break; > /* end of loop forever */

Explanation / Answer

Hi im working on it  dealing with a reliable data transfer Here's my code

so the way you following the code then you will get output

Thanks