public void ProcessTransferred(long transferred, SequenceRangeCollection ranges, int quotaRemaining) { bool flag; bool flag2; if (transferred < 0L) { throw Fx.AssertAndThrow("Argument transferred must be a valid sequence number or 0 for protocol messages."); } this.strategy.ProcessAcknowledgement(ranges, out flag, out flag2); if (!flag && ((transferred == 0L) || ranges.Contains(transferred))) { if ((transferred > 0L) && this.strategy.ProcessTransferred(transferred, quotaRemaining)) { ActionItem.Schedule(sendRetries, this); } else { this.OnTransferComplete(); } } else { WsrmFault fault = new InvalidAcknowledgementFault(this.id, ranges); this.RaiseFault(fault.CreateException(), fault); } }
public void ProcessTransferred(Int64 transferred, SequenceRangeCollection ranges, int quotaRemaining) { if (transferred < 0) { throw Fx.AssertAndThrow("Argument transferred must be a valid sequence number or 0 for protocol messages."); } bool invalidAck; // ignored, TransmissionStrategy is being used to keep track of what must be re-sent. // In the Request-Reply case this state may not align with acks. bool inconsistentAck; this.strategy.ProcessAcknowledgement(ranges, out invalidAck, out inconsistentAck); invalidAck = (invalidAck || ((transferred != 0) && !ranges.Contains(transferred))); if (!invalidAck) { if ((transferred > 0) && this.strategy.ProcessTransferred(transferred, quotaRemaining)) { ActionItem.Schedule(sendRetries, this); } else { this.OnTransferComplete(); } } else { WsrmFault fault = new InvalidAcknowledgementFault(this.id, ranges); RaiseFault(fault.CreateException(), fault); } }