Page 1 of 3 Programming Assignment #2 CSCE 3530 – Introduction to Computer Networks Spring 2023 100 Points Due: 02/22/2023, 11:55 PM Instructions: Compile the C programs in one of...

1 answer below »















I need your help to fix my code please, I need it by tomorrow. Please follow the instructions in the PDF and fix my code. Thank you.


























Page 1 of 3 Programming Assignment #2 CSCE 3530 – Introduction to Computer Networks Spring 2023 100 Points Due: 02/22/2023, 11:55 PM Instructions: Compile the C programs in one of the CELL (cell01 – cell06) servers and make sure it’s working. Comment your code. Create a Makefile to compile the source codes and to clean the executables. Create a readme file that describes how to compile, execute, and test the code. Create an assignment folder with folder name as euid_PA2 (example: xyz0202_PA2) and add all the source files, Makefile, and the readme file to the folder. Please create a zip archive of your assignment folder and upload the zip file to Canvas. Not following the above instructions could result in not accepting your programming assignment. Late submissions are not allowed. Objective: Create a client-server model that will measure performance of the connection in terms of round-trip time (RTT), end-to-end time, and throughput by sending and receiving text files. Requirements: 1. Create a C-based client-server architecture using TCP sockets 2. The port number of the server, IP address of the server, input file, and output file should be line arguments to the client program 3. The server should run on any cell machine and the client should be able to connect to the server to compute the performance of the connection 4. The server should accept and service at least one client’s requests 5. The client should send a 16 KB text file in chunks of 4 KB or lesser to the server and server should accumulate all the chunks 6. The server should then echo back the accumulated 16 KB data as 4 KB chunks or lesser to the client 7. The client should start a timer just before sending the 16 KB file to the server and stop the timer just after receiving all the chunks from the server to compute the round-trip time in ms 8. The received accumulated data from the server should be stored into an output text file. The input and output text file should be identical Page 2 of 3 9. The client should then compute the end-to-end time and the throughput 10. Print the round-trip time and end-to-end time in ms and throughput in Mbps on the client side. Make sure all the performance values are rounded off to three decimal places 11. Do not use any string functions to concatenate, copy, or do string manipulations when sending or receiving data on the client side 12. Do not use any string functions to concatenate, copy, or do string manipulations when receiving or sending data on the server side 13. The user will input a 16 KB text file and correct input arguments at the client side. Do not use any Linux shell commands or code from the internet. Procedure: 1. Create a C-based server that can accept at least one client’s request using TCP sockets 2. The server should be able to run on any cell machine and the format to start the server is as follows ./prserver where prserver is the performance server executable and port_number is the port number on which the server listens 3. Create a C-based client that can connect to the performance server using TCP sockets 4. The client can run on any cell server machine and should connect the performance server. The user should run the client using the input arguments as shown below ./prclient where prclient is the client executable, IP_Address is the IP address of the cell machine where the prserver runs, port_number is the port number where the prserver listens, input_file is the name of the 16 KB text file that is used for the test and output_file is the name of the file to which the received 16 KB data is written 5. Create a 16 KB input text file by referring to https://onlinefiletools.com/generate- random-text-file 6. Read the input file into a 16 KB character array or buffer and send the data in the buffer as 4 KB or lesser chucks to the server without using any string functions 7. The server should accumulate the chunks received from the client in to a single 16 KB buffer without using any string functions 8. The server should then echo back the accumulated 16 KB buffer as 4 KB or lesser chunks to the client without using any string functions https://onlinefiletools.com/generate-random-text-file https://onlinefiletools.com/generate-random-text-file Page 3 of 3 9. The client should accumulate the chunks in a 16 KB buffer without using any string functions and write the buffer to an output file 10. Compare the input file and output file using the diff program to see if the data in files are identical and it should be identical 11. A timer is started just before the file is sent to the server and stopped just after the chunks are accumulated on the client side. Please refer to https://linuxhint.com/gettimeofday_c_language/ for more details 12. When the start time is subtracted from the stop time the round-trip time (RTT) can be computed and half of the RTT gives the end-to-end time. Print the RTT and end-to-end time in ms on the client side. 13. The throughput is computed as the amount of data sent (16 KB) divided by the end-to-end time. Print the throughput in Mbps on the client side 14. Make sure all the performance values are rounded off to three decimal places 15. An example client interaction with the server is shown below. Client-side input/output: ./prclient 10.144.192.223 1234 test_16.txt recv_16.txt Round Trip Time: 2.417 ms End-to-end Time: 1.209 ms Throughput: 108.413 Mbps Deliverables: 1. Commented server and client C code 2. A Makefile to compile (make) the source code and to clean (make clean) the executable 3. A readme file that describes how to compile, execute, and test the code. 4. Create an assignment folder with folder name as euid_PA2 (example: xyz0202_PA2) and add all the source files, Makefile, and the readme file to the folder. Please create a zip archive of your assignment folder and upload the zip file to Canvas. https://linuxhint.com/gettimeofday_c_language/
Answered 1 days AfterFeb 21, 2023

Answer To: Page 1 of 3 Programming Assignment #2 CSCE 3530 – Introduction to Computer Networks Spring...

Amar Kumar answered on Feb 23 2023
48 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here