Note that the semantics of the UNIX close as applied to sockets differ from Win32's closesocket. If you want to emulate the UNIX close on Win32, there is more to it than just calling closesocket. Otherwise, visible data loss will occur.
Relevant MSDN quote[1]
"To assure that all data is sent and received on a connection, an application should call shutdown before calling closesocket (see Graceful shutdown, linger options, and socket closure[2] for more information).
why is that different from Unix? I thought this was a TCP protocol thing, i.e., you should do shutdown() before closing a socket on any platform to insure no data loss.
Greg
