public void Disconnect()
{
trace.TraceInformation("Disconnect");
try
{
// this will cause the deserializer thread to wake up
m_socket.Shutdown(SocketShutdown.Both);
}
catch (SocketException e)
{
trace.TraceError("Error when disconnecting: {0}", e.Message);
}
m_deserializerThread.Join();
trace.TraceInformation("Disconnect done");
}