blob: b921b76ed88d3a18e51cd3297639226ea655a60f [file] [log] [blame]
// 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.
#include "net/third_party/quic/tools/quic_simple_client_stream.h"
namespace quic {
void QuicSimpleClientStream::OnDataAvailable() {
if (!drop_response_body_) {
QuicSpdyClientStream::OnDataAvailable();
return;
}
while (HasBytesToRead()) {
struct iovec iov;
if (GetReadableRegions(&iov, 1) == 0) {
break;
}
MarkConsumed(iov.iov_len);
}
if (sequencer()->IsClosed()) {
OnFinRead();
} else {
sequencer()->SetUnblocked();
}
}
} // namespace quic