//******************************************************************** /// <summary> Function used to disconnect from the server </summary> public void Disconnect() { LogLib.WriteLine("Entering in CSocketClient.Disconnect()", LogLevel.Trace); // Close down the connection if (GetNetworkStream != null) { GetNetworkStream.Close(); } if (GetTcpClient != null) { GetTcpClient.Close(); } if (GetClientSocket != null) { GetClientSocket.Close(); } // Clean up the connection state GetClientSocket = null; GetNetworkStream = null; GetTcpClient = null; LogLib.WriteLine("Exiting in CSocketClient.Disconnect()", LogLevel.Trace); }
//******************************************************************** /// <summary> Function used to disconnect from the server </summary> public void Disconnect() { // Close down the connection GetNetworkStream?.Close(); GetTcpClient?.Close(); GetClientSocket?.Close(); // Clean up the connection state GetClientSocket = null; GetNetworkStream = null; GetTcpClient = null; }
//******************************************************************** /// <summary> Function used to disconnect from the server </summary> public void Disconnect() { // Close down the connection GetNetworkStream?.Close(); GetTcpClient?.Close(); }