public static SocketWithTimeout StartNewConnection(ISocketWithTimeoutClient client, TCPTerminalParam param, string password, HostKeyCheckCallback keycheck) { Size sz = GEnv.Frame.TerminalSizeForNextConnection; //Size sz = new System.Drawing.Size(528, 316); SocketWithTimeout swt; if (param.Method == ConnectionMethod.Telnet) //Telnet { swt = new TelnetConnector((TelnetTerminalParam)param, sz); } else //SSH { swt = new SSHConnector((SSHTerminalParam)param, sz, password, keycheck); } if (GEnv.Options.UseSocks) { swt.AsyncConnect(client, CreateSocksParam(param.Host, param.Port)); } else { swt.AsyncConnect(client, param.Host, param.Port); } return(swt); }
public static Connector AsyncPrepareSocket(ISocketWithTimeoutClient client, LocalShellTerminalParam param) { Connector c = new Connector(param, client); GUtil.CreateThread(new ThreadStart(c.AsyncConnect)).Start(); return(c); }
public void AsyncConnect(ISocketWithTimeoutClient client, Socks socks) { _async = true; _client = client; _event = null; _socks = socks; UI.UILibUtil.CreateThread(new ThreadStart(this.Run)).Start(); }
public static SocketWithTimeout StartNewConnection(ISocketWithTimeoutClient client, ChannelProfile prof, string password, HostKeyCheckCallback keycheck) { SocketWithTimeout swt; swt = new SSHConnector(prof, password, keycheck); /* if (Env.Options.UseSocks) swt.AsyncConnect(client, CreateSocksParam(prof.SSHHost, prof.SSHPort)); else*/ swt.AsyncConnect(client, prof.SSHHost, prof.SSHPort); return swt; }
public void AsyncConnect(ISocketWithTimeoutClient client, string host, int port) { _async = true; _client = client; _event = null; _host = host; _port = port; //_socks = null; Util.CreateThread(new ThreadStart(this.Run)).Start(); }
public void AsyncConnect(ISocketWithTimeoutClient client, string host, int port, Action <ConnectionTag, string> connectResultProcess) { _async = true; _client = client; _event = null; _host = host; _port = port; _socks = null; _connectResultProcess = connectResultProcess; UI.UILibUtil.CreateThread(new ThreadStart(this.Run)).Start(); }
public static SocketWithTimeout StartNewConnection(ISocketWithTimeoutClient client, ChannelProfile prof, string password, VerifySSHHostKeyDelegate keycheck) { SocketWithTimeout swt; swt = new SSHConnector(prof, password, keycheck); /* * if (Env.Options.UseSocks) * swt.AsyncConnect(client, CreateSocksParam(prof.SSHHost, prof.SSHPort)); * else*/ swt.AsyncConnect(client, prof.SSHHost, prof.SSHPort); return(swt); }
public static Connector AsyncPrepareSocket(ISocketWithTimeoutClient client, LocalShellTerminalParam param) { Connector c = new Connector(param, client); GUtil.CreateThread(new ThreadStart(c.AsyncConnect)).Start(); return c; }
public Connector(LocalShellTerminalParam param, ISocketWithTimeoutClient client) { _param = param; _client = client; }
public static SocketWithTimeout StartNewConnection(ISocketWithTimeoutClient client, TCPTerminalParam param, string password, HostKeyCheckCallback keycheck) { Size sz = GEnv.Frame.TerminalSizeForNextConnection; SocketWithTimeout swt; if(param.Method==ConnectionMethod.Telnet) { //Telnet swt = new TelnetConnector((TelnetTerminalParam)param, sz); } else { //SSH swt = new SSHConnector((SSHTerminalParam)param, sz, password, keycheck); } if(GEnv.Options.UseSocks) swt.AsyncConnect(client, CreateSocksParam(param.Host, param.Port)); else swt.AsyncConnect(client, param.Host, param.Port); return swt; }