/* * private static Socks CreateSocksParam(string dest_host, int dest_port) { * Socks s = new Socks(); * s.DestName = dest_host; * s.DestPort = (short)dest_port; * s.Account = Env.Options.SocksAccount; * s.Password = Env.Options.SocksPassword; * s.ServerName = Env.Options.SocksServer; * s.ServerPort = (short)Env.Options.SocksPort; * s.ExcludingNetworks = Env.Options.SocksNANetworks; * return s; * } */ public void ManualClose(ChannelProfile prof) { if (!IsConnected(prof)) { Debug.WriteLine("ManualClose - Not connected"); return; } lock (this) { ISSHConnection c = (ISSHConnection)_profileToConnection[prof]; _manualClosingConnections.Add(c); c.Disconnect(DisconnectionReasonCode.ByApplication, "close by application"); } }