Example #1
0
 public MessageRelease SetTransfers(RangeSet value)
 {
     _Transfers     = value;
     packing_flags |= 256;
     Dirty          = true;
     return(this);
 }
 public Acquired SetTransfers(RangeSet value)
 {
     _Transfers     = value;
     packing_flags |= 256;
     Dirty          = true;
     return(this);
 }
        public SessionCommandFragment SetByteRanges(RangeSet value)
        {
            _ByteRanges = value;

            Dirty = true;
            return(this);
        }
 public SessionConfirmed SetCommands(RangeSet value)
 {
     _Commands      = value;
     packing_flags |= 256;
     Dirty          = true;
     return(this);
 }
Example #5
0
 public override void Read(IDecoder dec)
 {
     packing_flags = (int)dec.ReadUint16();
     if ((packing_flags & 256) != 0)
     {
         _Commands = dec.ReadSequenceSet();
     }
 }
Example #6
0
        public RangeSet Copy()
        {
            RangeSet copy = new RangeSet();

            foreach (Range r in _ranges)
            {
                copy._ranges.Add(r);
            }
            return(copy);
        }
Example #7
0
 public override void Read(IDecoder dec)
 {
     packing_flags = (int)dec.ReadUint16();
     if ((packing_flags & 256) != 0)
     {
         _Transfers = dec.ReadSequenceSet();
     }
     if ((packing_flags & 512) != 0)
     {
         _Code = MessageRejectCodeGetter.Get(dec.ReadUint16());
     }
     if ((packing_flags & 1024) != 0)
     {
         _Text = dec.ReadStr8();
     }
 }
Example #8
0
        public MessageAccept(RangeSet Transfers, params Option[] options)
        {
            SetTransfers(Transfers);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
        public SessionGap(RangeSet Commands, params Option[] options)
        {
            SetCommands(Commands);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
Example #10
0
 public void KnownComplete(RangeSet kc)
 {
     lock (_processedLock)
     {
         RangeSet newProcessed = new RangeSet();
         foreach (Range pr in _processed)
         {
             foreach (Range kr in kc)
             {
                 foreach (Range r in pr.Subtract(kr))
                 {
                     newProcessed.Add(r);
                 }
             }
         }
         _processed = newProcessed;
     }
 }
Example #11
0
        public MessageRelease(RangeSet Transfers, params Option[] options)
        {
            SetTransfers(Transfers);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SET_REDELIVERED: packing_flags |= 512; break;

                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
Example #12
0
        public MessageReject(RangeSet Transfers, MessageRejectCode Code, String Text, params Option[] options)
        {
            SetTransfers(Transfers);
            SetCode(Code);
            SetText(Text);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
Example #13
0
        public SessionCompleted(RangeSet Commands, params Option[] options)
        {
            SetCommands(Commands);

            for (int i = 0; i < options.Length; i++)
            {
                switch (options[i])
                {
                case Option.TIMELY_REPLY: packing_flags |= 512; break;

                case Option.SYNC: Sync = true; break;

                case Option.BATCH: Batch = true; break;

                case Option.NONE: break;

                default: throw new Exception("invalid option: " + options[i]);
                }
            }
        }
Example #14
0
 public void MessageAccept(RangeSet Transfers, params Option[] options)
 {
     Invoke(new MessageAccept(Transfers, options));
 }
 public SessionCommandFragment(int CommandId, RangeSet ByteRanges)
 {
     SetCommandId(CommandId);
     SetByteRanges(ByteRanges);
 }
 public override void Read(IDecoder dec)
 {
     _CommandId  = dec.ReadSequenceNo();
     _ByteRanges = dec.ReadByteRanges();
 }
Example #17
0
 public IFuture MessageAcquire(RangeSet Transfers, params Option[] options)
 {
     return(Invoke(new MessageAcquire(Transfers, options), new ResultFuture()));
 }
Example #18
0
 public void MessageRelease(RangeSet Transfers, params Option[] options)
 {
     Invoke(new MessageRelease(Transfers, options));
 }
Example #19
0
 public void SessionGap(RangeSet Commands, params Option[] options)
 {
     Invoke(new SessionGap(Commands, options));
 }
Example #20
0
 public void SessionKnownCompleted(RangeSet Commands, params Option[] options)
 {
     Invoke(new SessionKnownCompleted(Commands, options));
 }
Example #21
0
 public void SessionConfirmed(RangeSet Commands, List <Object> Fragments, params Option[] options)
 {
     Invoke(new SessionConfirmed(Commands, Fragments, options));
 }
Example #22
0
 public void MessageReject(RangeSet Transfers, MessageRejectCode Code, String Text, params Option[] options)
 {
     Invoke(new MessageReject(Transfers, Code, Text, options));
 }
 public Acquired(RangeSet Transfers)
 {
     SetTransfers(Transfers);
 }