blob: f1eb653bea4a76189992841141f3be0543e74793 [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#ifndef QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CLIENT_STREAM_H_
6#define QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CLIENT_STREAM_H_
7
8#include "net/third_party/quiche/src/quic/core/http/quic_spdy_client_stream.h"
9
10namespace quic {
11
12class QuicSimpleClientStream : public QuicSpdyClientStream {
13 public:
14 QuicSimpleClientStream(QuicStreamId id,
15 QuicSpdyClientSession* session,
16 StreamType type,
17 bool drop_response_body)
18 : QuicSpdyClientStream(id, session, type),
19 drop_response_body_(drop_response_body),
20 last_stop_sending_code_(0) {}
21 void OnBodyAvailable() override;
22 void OnStopSending(uint16_t code) override;
23
24 uint16_t last_stop_sending_code() { return last_stop_sending_code_; }
25 private:
26 const bool drop_response_body_;
27 // Application code value that was in the most recently received
28 // STOP_SENDING frame for this stream.
29 uint16_t last_stop_sending_code_;
30};
31
32} // namespace quic
33
34#endif // QUICHE_QUIC_TOOLS_QUIC_SIMPLE_CLIENT_STREAM_H_