In this assignment, you will write UDP client and server echo programs. You will also learn the advantages and disadvantages of UDP over TCP and understand
how UDP can be used for bidirectional communication in spite of its lack of connection.
Using the South University Online Library or the Internet, research UDP client and server echo programs and UDP broadcasting
Based on your research and understanding, complete the following discussions:
Part 1
Answer the following questions:
How can you enhance a UDP application to provide the kind of reliability offered by TCP?
What are the situations when UDP is preferred over TCP, and vice versa?
Part 2
Write and post client and server programs to implement a reliable File Transfer Protocol (FTP) using UDP. Your program should take the following into
consideration:
The client will request chunks of a file from the server. If the client does not receive some chunks back after a certain period of time, the client will ask
for those chunks again.
The client can request multiple chunks of data in one request and can handle multiple replies from the server
The client should be able to handle overlapping chunks of data, find missing chunks, and only request missing data, not the entire window worth of data, to be
retransmitted.
The client will send a request message to the server and then wait for data messages in reply. If the client does not receive a valid response before a time-
out occurs, it will retransmit the request. If, however, the client receives some valid replies, it will transmit a request for missing data in each gap
before requesting for new data. A retransmission request is made in each gap before requesting for the new data. Retransmission is done for a maximum of four
times. A selective retransmission request is considered a separate request.