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?
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.
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.