示例#1
0
        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);
        }