public static int StartSocketClient(string host, string path, string user, string[] args, ClientInfo cInfo) { var options = cInfo.Options; if (!path.IsBlank() && path.StartsWith('/'.ToString())) { Log.WriteLine("ERROR: The remote path must start with a module name not a /"); return(-1); } cInfo.IoStream = OpenSocketOutWrapped(host, options.RsyncPort, options.BindAddress); if (cInfo.IoStream != null) { StartInbandExchange(user, path, cInfo, args.Length); } var client = new Client(); return(client.ClientRun(cInfo, -1, args)); }
public static int StartSocketClient(string host, string path, string user, string[] args, ClientInfo cInfo) { Options options = cInfo.Options; if (path.CompareTo(String.Empty) != 0 && path[0] == '/') { Log.WriteLine("ERROR: The remote path must start with a module name not a /"); return(-1); } cInfo.IoStream = OpenSocketOutWrapped(host, options.rsyncPort, options.bindAddress); if (cInfo.IoStream != null) { StartInbandExchange(user, path, cInfo, args.Length); } Client client = new Client(); return(client.ClientRun(cInfo, -1, args)); }
public static int StartSocketClient(string host, string path, string user, string[] args, ClientInfo cInfo) { Options options = cInfo.Options; if (path.CompareTo(String.Empty) != 0 && path[0] == '/') { Log.WriteLine("ERROR: The remote path must start with a module name not a /"); return -1; } cInfo.IoStream = OpenSocketOutWrapped(host, options.rsyncPort, options.bindAddress); if (cInfo.IoStream != null) { StartInbandExchange(user, path, cInfo, args.Length); } Client client = new Client(); return client.ClientRun(cInfo, -1, args); }