blob: a627007972cbbcbf45ccbcee64d1fe538937a043 [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
5#include "net/third_party/quiche/src/quic/tools/quic_simple_client_stream.h"
6
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
29void QuicSimpleClientStream::OnStopSending(uint16_t code) {
30 last_stop_sending_code_ = code;
31}
32
33} // namespace quic