TCP TIME_WAIT state

This is a discussion on TCP TIME_WAIT state within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Just though to share this with those of you who are into network programming:
According to every network programming resource ...

TCP TIME_WAIT state

Just though to share this with those of you who are into network programming:

According to every network programming resource I have seen TIME_WAIT state after closing a TCP connection is a normal thing. It should remain there up to 2MSL and then it dissappears. I have written and seen a lot of TCP servers and clients that demonstrate this perfectly. Most of the time TCP acts according to specification, and depending on which side made the active close, the same side would remain in the TIME_WAIT state preventing the reincarnation of this socket.

The TIME_WAIT state can be avoided if the connection is reset after one side initiated an active close. In this case the connection dissappears completely from the netstat table. This is what I wanted to achieve and I actually did this in my latest server.

But after doing some research on the Internet and reading some Stevens books and some RFCs I discovered that immediate termination of the TIME_WAIT state can lead to problems with TCP especially using TCP connections.

I was thinking about this and I really can't think of any problems that might arise from doing this, especially if my own internal data is enumerated and sequential (but it could be either synchronous or asynchronous).