// Copyright (c) 2018 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef QUICHE_QUIC_CORE_HTTP_QUIC_SPDY_STREAM_BODY_MANAGER_H_ #define QUICHE_QUIC_CORE_HTTP_QUIC_SPDY_STREAM_BODY_MANAGER_H_ #include "absl/base/attributes.h" #include "absl/strings/string_view.h" #include "quiche/quic/core/quic_constants.h" #include "quiche/quic/platform/api/quic_bug_tracker.h" #include "quiche/quic/platform/api/quic_export.h" #include "quiche/common/platform/api/quiche_iovec.h" #include "quiche/common/quiche_circular_deque.h" namespace quic { // All data that a request stream receives falls into one of two categories: // * "body", that is, DATA frame payload, which the QuicStreamSequencer must // buffer until it is read; // * everything else, which QuicSpdyStream immediately processes and thus could // be marked as consumed with QuicStreamSequencer, unless there is some piece // of body received prior that still needs to be buffered. // QuicSpdyStreamBodyManager does two things: it keeps references to body // fragments (owned by QuicStreamSequencer) and offers methods to read them; and // it calculates the total number of bytes (including non-body bytes) the caller // needs to mark consumed (with QuicStreamSequencer) when non-body bytes are // received or when body is consumed. class QUICHE_EXPORT QuicSpdyStreamBodyManager { … }; } // namespace quic #endif // QUICHE_QUIC_CORE_HTTP_QUIC_SPDY_STREAM_BODY_MANAGER_H_