Explain the TIME_WAIT state.



Explain the TIME_WAIT state...

Answer / chaitanya

Remember that TCP guarantees all data transmitted will be delivered, if at all possible. When you close a socket, the server goes into a TIME_WAIT state, just to be really really sure that all the data has gone through. When a socket is closed, both sides agree by sending messages to each other that they will send no more data. This, it seemed to me was good enough, and after the handshaking is done, the socket should be closed. The problem is two-fold. First, there is no way to be sure that the last ack was communicated successfully. Second, there may be "wandering duplicates" left on the net that must be dealt with if they are delivered.

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Unix Socket Programming Interview Questions

How do I get my server to find out the clients address / host- name?

1 Answers  


What is the difference between connected and unconnected sockets?

1 Answers  


When should I use shutdown()?

1 Answers   Wipro,


What is the purpose of socket?

0 Answers  


Where is the socket located?

0 Answers  






How many socket connections can a server handle?

0 Answers  


What is a sae socket?

0 Answers  


over the socket? Is there a way to have a dynamic buffer? What does one do when one does not know how much information is coming?

1 Answers  


What are Sockets?

1 Answers  


How is a socket created?

0 Answers  


After the chroot(), calls to socket() are failing. Why?

1 Answers  


Why does the sockets buffer fill up sooner than expected?

0 Answers  


Categories