1.5
|
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.
|