• Welcome to Valhalla Legends Archive.
 

Winsock2 CLOSE_WAIT

Started by Paul, July 24, 2004, 02:37 AM

Previous topic - Next topic

Paul

I'm running in to a bit of a problem with closing my socket.  After I disconnect from my server with my client the socket the client was using goes in to a CLOSE_WAIT state.  I'm using API closesocket but it doesn't help.

Is there a way to avoid the CLOSE_WAIT state without causing problems or a way to properly close a socket other than closewait?

UserLoser.

Googled this link.  It looks like it might be able to help you.

Adron

CLOSE_WAIT should happen for a socket that hasn't been closed. If you closesocket the socket both in the server and the client application, it should go into the TIME_WAIT state.