Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Modify Figure 1.9 as follows: First, change the port number assigned to the sin_port member from 13 to 9999. Next, change the single call to write into a loop that calls write for each byte of the...

1 answer below »

Modify Figure 1.9 as follows: First, change the port number assigned to the sin_port member from 13 to 9999. Next, change the single call to write into a loop that calls write for each byte of the result string. Compile this modified server and start it running in the background. Next, modify the client from the previous exercise (which prints the counter before terminating), changing the port number assigned to the sin_port member from 13 to 9999. Start this client, specifying the IP address of the host on which the modified server is running as the command-line argument. What value is printed as the client's counter? If possible, also try to run the client and server on different hosts.

Answered 123 days After May 14, 2022

Solution

Chandrama answered on Sep 14 2022
66 Votes
1.4
    Modify Figure 1.5 by placing a counter in the while loop, counting the number of times read returns a value greater than 0. Print the value of the counter before terminating. Compile and run your new client.
Modified file: ../unpv13e/intro$ daytimetcpcli.c
The 1.4 comments part related to the change of this Question 1.4
Copy the .c file in the unpv13e/intro$ and run the make file
unpv13e/intro$ make
Run the server :
Run...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here