On Fri, 14 Dec 2007 11:01:33 -0800, Frank Rizzo <no**@none.netwrote:
When you close a socket (.e.g. .Shutdown, .Dispose, etc...), the socket
goes into TIME_WAIT mode for about 4 minutes, then gets killed by the
OS. However, during this time, the socket is not available. Is there a
way to close a socket, so that it actually closes and is immediately
available to be used by another application (or the same application)?
The behavior you're seeing is intentional and not changeable at the
application level. You can use the ReuseAddress socket option as a
workaround but keep in mind that doing so may introduce ambiguities with
respect to which socket is actually going to receive data (I don't recall
the specifics off the top of my head...you'll want to read up on the
option...searching using the Winsock constant SO_REUSEADDR may turn up
better details than looking at the .NET-specific docs).
Pete