Stopping server

Jul 20, 2010 at 3:53 AM

Is there a way to stop the Server class? Ideally it would have a stop method and it would do all the things like unhooking events of classes that is listens and stop all the guys that have started (HttpServer, etc)

I also noticed that when I am running tests that try and "fake" stopping and starting as best they can, my test suite will never exit because my finalizer thread is hanging on ReusableNetworkStream.Dispose() on the Socket.Disconnect(true) call. Have you seen this before and is there something I may be doing wrong?