TIME_WAIT state from the original CLOSED
state. (If you have some difficulty in drawing the diagram with
a computer, you can just draw it on a piece of paper and attach
this paper to your hard copy submission).
sock:
close (sock);
shutdown (sock, SHUT_RDWR);
daytime server and client programs
in the following way:connect
returns, and calls shutdown on the socket with
SHUT_RD as the value of the second parameter.
After that the client tries to get data from the server
until read returns 0.acceptreturns, and sleeps for 5 seconds,
and then write the same date string to the client.
Observe the result and compare the result with
the description for SHUT_RD on Page 160 of Stevens' text.
SIG_PIPE signal
from the write operation on an open socket in detail.
Write a snippet of code to prevent your program from terminating
for this signal.
TIME_WAIT state for 2 MSL time.
select is used to test if an open
socket is ready for reading or writing. Answer the following
questions about this function:
select and poll.
handin program is 3.
To submit your assignment with the handin program, type:
~cs742/bin/handin 3 files-to-submit