TIME_WAIT state

in TCP, is TIME_WAIT state really essential..!!!

What problems are you having?

Yes, it is really essential!!

For one thing, consider a socket that has sent the final packet which is an ACK to acknowledge the final FIN packet. If everything works right, this is the end of the connection. But what if that final ACK packet gets lost? The other side will timeout and retransmit the final FIN. A socket in TIME_WAIT will be able to retransmit that final ACK, thus allowing the other side to close down.

The other problem is wandering duplicates, packets which seemed to have disappeared, but really just got lost for a while and then finally arrived. A socket in TIME_WAIT has enough information to recognize them for what they are, and simply discard them. If the socket was destroyed somehow and a new connection is established that looks like the old connection, wandering duplicates from the first connection will be delivered to the second connection, possibly injecting garbage into the data stream.

i jus wanted to know..
thanks for the information friends..