Valhalla Legends Archive

Programming => General Programming => C/C++ Programming => Topic started by: Paul on July 24, 2004, 02:37 AM

Title: Winsock2 CLOSE_WAIT
Post by: Paul on July 24, 2004, 02:37 AM
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?
Title: Re:Winsock2 CLOSE_WAIT
Post by: UserLoser. on July 24, 2004, 11:55 AM
Googled this (http://www.eggheadcafe.com/ng/microsoft.public.win32.programmer.kernel/post311339.asp) link.  It looks like it might be able to help you.
Title: Re:Winsock2 CLOSE_WAIT
Post by: Adron on July 24, 2004, 06:58 PM
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.