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 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; }