Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Automating Access Databases With Macros

Authors: Fish Davis

1st Edition

1797816349, 978-1797816340

More Books

Students also viewed these Databases questions