示例#1
0
    public override void AdvanceTo(SequencePosition consumed, SequencePosition examined)
    {
        var newlyExaminedBytes = TrackConsumedAndExaminedBytes(_readResult, consumed, examined);

        // Ensure we consume data from the RequestBodyPipe before sending WINDOW_UPDATES to the client.
        _context.RequestBodyPipe.Reader.AdvanceTo(consumed, examined);

        // The HTTP/2 flow control window cannot be larger than 2^31-1 which limits bytesRead.
        _context.OnDataRead((int)newlyExaminedBytes);
        AddAndCheckObservedBytes(newlyExaminedBytes);
    }