blob: 21145e1e2c75e9442cd7d8cc038935095bcb09c1 [file] [log] [blame]
QUICHE teama6ef0a62019-03-07 20:34:33 -05001// Copyright (c) 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
QUICHE team5be974e2020-12-29 18:35:24 -05005#include "quic/tools/quic_simple_client_stream.h"
QUICHE teama6ef0a62019-03-07 20:34:33 -05006
7namespace quic {
8
9void QuicSimpleClientStream::OnBodyAvailable() {
10 if (!drop_response_body_) {
11 QuicSpdyClientStream::OnBodyAvailable();
12 return;
13 }
14
15 while (HasBytesToRead()) {
16 struct iovec iov;
17 if (GetReadableRegions(&iov, 1) == 0) {
18 break;
19 }
20 MarkConsumed(iov.iov_len);
21 }
22 if (sequencer()->IsClosed()) {
23 OnFinRead();
24 } else {
25 sequencer()->SetUnblocked();
26 }
27}
28
QUICHE teama6ef0a62019-03-07 20:34:33 -050029} // namespace quic