In this assignment , you are required to write s UDP server-client application that performs simple file transfer as follows:
- The client should perform the following:
- Read the name of the file to be read from the console. The user should enter the file name. Assume that all files are .txt files.
- Send the name of the file to the server.
- Receive the contents of the file and display it to the console.
- Write the received content to a file with the same name
- The server should perform the following:
- Listen continuously for client's requests.
- Read the name of the file written in each packet received from a client.
- Read the contents of the requested file and send them to the client.
Note: You may assume that all files are located in the same parent directory of your project at the server side and write to the files in the same parent directory of your project at client side.