Abit of a problem - When a client disconnects from my server, the socket on the server doesn't fully close, instead of kind of hangs on CLOSE_WAIT. I dont know how to detect what state a socket is in (like that), so I cant really think of anyways to remedy this problem.

[EDIT] - I have found that this only seems to be happening on VB programs that use the winsock control... Maybe some other non vb programs, but generally when I connect with a vb application, it connects fine, then when it disconnects (and even when the app is closed), the server socket is lingering on CLOSE_WAIT - Aswell, there is a FIN_WAIT_2 state for the socket used by the vb program? I dont really understand what the deal is here ...

Any ideas?