internal SocketClientConnection(SocketClientSettings config) { configuration = config; responseHelper = new ServerResponseHelper(config); clientSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); ConnectToServer(); }
protected virtual void Dispose(bool disposing) { if (disposed) { return; } if (disposing) { if (clientSocket.Connected) { clientSocket.Close(); } clientSocket.Dispose(); clientSocket = null; responseHelper = null; } }