Пример #1
0
        public static void DoServerReceive(ClientInfo cInfo, string[] args)
        {
            Options  options = cInfo.Options;
            IOStream f       = cInfo.IoStream;

            if (options.verbose > 2)
            {
                Log.Write("Server receive starting");
            }
            if (options.amDaemon && config.ModuleIsReadOnly(options.ModuleId))
            {
                MainClass.Exit("ERROR: module " + config.GetModuleName(options.ModuleId) + " is read only", cInfo);
                return;
            }

            f.IOStartBufferingIn();
            if (options.deleteMode && !options.deleteExcluded)
            {
                Exclude excl = new Exclude(options);
                excl.ReceiveExcludeList(f);
            }

            FileList          fList    = new FileList(cInfo.Options);
            List <FileStruct> fileList = fList.receiveFileList(cInfo);

            DoReceive(cInfo, fileList, null);
        }
Пример #2
0
        public static void DoServerReceive(ClientInfo cInfo, string[] args)
        {
            var options = cInfo.Options;
            var f       = cInfo.IoStream;

            if (options.Verbose > 2)
            {
                Log.Write("Server receive starting");
            }
            if (options.AmDaemon && Config.ModuleIsReadOnly(options.ModuleId))
            {
                WinRsync.Exit("ERROR: module " + Config.GetModuleName(options.ModuleId) + " is read only", cInfo);
                return;
            }

            f.IoStartBufferingIn();
            if (options.DeleteMode && !options.DeleteExcluded)
            {
                var excl = new Exclude(options);
                excl.ReceiveExcludeList(f);
            }

            var fList    = new FileList(cInfo.Options);
            var fileList = fList.ReceiveFileList(cInfo);

            DoReceive(cInfo, fileList, null);
        }
Пример #3
0
        public static void StartServer(ClientInfo cInfo, string[] args)
        {
            IOStream f       = cInfo.IoStream;
            Options  options = cInfo.Options;

            if (options.protocolVersion >= 23)
            {
                f.IOStartMultiplexOut();
            }
            if (options.amSender)
            {
                options.keepDirLinks = false; /* Must be disabled on the sender. */
                Exclude excl = new Exclude(options);
                excl.ReceiveExcludeList(f);
                DoServerSender(cInfo, args);
            }
            else
            {
                DoServerReceive(cInfo, args);
            }
        }
Пример #4
0
        public static void DoServerReceive(ClientInfo cInfo, string[] args)
        {
            Options options = cInfo.Options;
            IOStream f = cInfo.IoStream;
            if (options.verbose > 2)
            {
                Log.Write("Server receive starting");
            }
            if (options.amDaemon && config.ModuleIsReadOnly(options.ModuleId))
            {
                MainClass.Exit("ERROR: module " + config.GetModuleName(options.ModuleId) + " is read only", cInfo);
                return;
            }

            f.IOStartBufferingIn();
            if (options.deleteMode && !options.deleteExcluded)
            {
                Exclude excl = new Exclude(options);
                excl.ReceiveExcludeList(f);
            }

            FileList fList = new FileList(cInfo.Options);
            List<FileStruct> fileList = fList.receiveFileList(cInfo);
            DoReceive(cInfo, fileList, null);
        }
Пример #5
0
        public static void StartServer(ClientInfo cInfo, string[] args)
        {
            IOStream f = cInfo.IoStream;
            Options options = cInfo.Options;

            if (options.protocolVersion >= 23)
            {
                f.IOStartMultiplexOut();
            }
            if (options.amSender)
            {
                options.keepDirLinks = false; /* Must be disabled on the sender. */
                Exclude excl = new Exclude(options);
                excl.ReceiveExcludeList(f);
                DoServerSender(cInfo, args);
            }
            else
            {
                DoServerReceive(cInfo, args);
            }
        }