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

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

Could someone give me a Python code dealing with a reliable data

/*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 */

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!