I’m studying for my Computer Science class and don’t understand how to answer this. Can you help me study?
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:
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?
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.
Course Project Part 5—Handling Multiple Clients In the distributed library application, the server multicasts a specific book request to all the available clients. It, then, collates the results to send the list of peers serving the requested book along with their port numbers. This is required for implementing the LIST and SEARCH features in the distributed library application. You can refer to the CPANwebsite for hel
In Weeks 2 to 4, you have implemented a distributed library application that supports JOIN, LIST, SEARCH, and DOWNLOAD features.
Using the simple client and server authentication programs you wrote in W4 Assignment 2 as the basis, in this final week’s assignment, you will be required to extend them to handle multiple clients.
Using the Microsoft Word document from W4 Assignment 2, write a program to address the following:
- The modifications required at the client end are as follows:
- The client, which is capable of serving books, opens a listening socket waiting for requests from its peers.
- On registration, the client sends a 4-digit port number along with a login ID and password on which it is listening for requests from its peers.
- The modifications required at the server end as soon as the server receives a request from the client are as follows:
- The server authenticates the client by using the login ID and password information.
- The server provides the port numbers of all listening clients from the file it maintains to record all the client information—login ID, password, and port number.
- On receiving a reply from the server, the client arbitrarily picks another client and contacts it with a time-of-day request
- Messages must be appropriately printed on the client and server windows when a particular request is received or when the programs send a particular response.
- Additionally, complete the following tasks:
- Include a copy of your client and server programs implementing the distributed library application.
- Describe the method for invoking your programs.
- Include client and server window screenshots to validate your implementation.