Dwarrowdelf.TcpConnection.Disconnect C# (CSharp) Method

Disconnect() public method

public Disconnect ( ) : void
return void
		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");
		}