Hello, David!
DP> Unfortunately the underlying sockets are not actually being closed
DP> (i.e. the clients are not disconnected and netstat reports that the
DP> underlying TCP connections still exist.).
DP> Any ideas?
It seems to me that you should use other NetworkStream constructor
Stream s = new NetworkStream(ClientSocket, true);
Second parameter specifies if the stream owns the socket. And if you want to close socket from the stream, you must specify that stream as socket owner...
ps. there is no need calling dispose manually, Close() will be sufficient ( it calls Dispose internally )
--
Regards, Vadym Stetsyak
www:
http://vadmyst.blogspot.com