I have some problems to make a network component.

It is a "TIME_WAIT" state on client socket.

When the socket is in "TIME_WAIT" state, it cannot connect into any remote server.

How can I avoid "TIME_WAIT" state?

Or, is there any function that can check a socket in "TIME_WAIT" or not ?



I disconnect all sessions using "DisconnectEx" function for re-using socket.

And, all sockets are pre-binded.

There are no problem when I disconnect client from server.

But, client disconnects itself and then socket falls in "TIME_WAIT" state.

I tryed to remove that state, but I can't. (failed..all)

I applied handshaking routine, LINGER option and changing into blocking mode..

As you know, TIME_WAIT state's duration is so~~~~ long!!

So, I want to know, how to check it or avoid it. ( TIME_WAIT state )



--
( NOVICE )
Student~
Seoul. Korea.