Assignment: UDP Client and Server Programs

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.
The server will listen at a given port for client requests. If it receives a well-formed request, the server will respond with the data message. However, if the server encounters an error, it will send an error message.

Solution Preview

This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.

How can you enhance a UDP application to provide the kind of reliability offered by TCP?
UDP and TCP are the two major Internet transport layer protocols. There are some differences between the protocols. Firstly, UDP provides simple service which is unreliable while TCP provides reliable services. UDP is preferred in situations when it is important that the data is delivered in a speedier manner and the loss of the odd datagram is not that important. In order to use UDP, functions need to be used at the application layer such as reordering and reliability and trade-offs can be made. There is another approach in which Partially Reliable Transport Protocol (PRTP) is used. This can be created through the use of simpler receiver-side modification of the TCP layer. PRTP is more flexible than UDP’s unreliable service (Dowland & Furnell, 2002). One important feature that is desired is that the packets should be received in an ordered manner....

This is only a preview of the solution. Please use the purchase button to see the entire solution


or free if you
register a new account!

Related Homework Solutions

Get help from a qualified tutor
Live Chats