xref: /aosp_15_r20/external/cronet/net/third_party/quiche/src/quiche/quic/core/http/quic_spdy_server_stream_base.h (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1 // Copyright (c) 2016 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_CORE_HTTP_QUIC_SPDY_SERVER_STREAM_BASE_H_
6 #define QUICHE_QUIC_CORE_HTTP_QUIC_SPDY_SERVER_STREAM_BASE_H_
7 
8 #include "quiche/quic/core/http/quic_spdy_stream.h"
9 
10 namespace quic {
11 
12 class QUICHE_EXPORT QuicSpdyServerStreamBase : public QuicSpdyStream {
13  public:
14   QuicSpdyServerStreamBase(QuicStreamId id, QuicSpdySession* session,
15                            StreamType type);
16   QuicSpdyServerStreamBase(PendingStream* pending, QuicSpdySession* session);
17   QuicSpdyServerStreamBase(const QuicSpdyServerStreamBase&) = delete;
18   QuicSpdyServerStreamBase& operator=(const QuicSpdyServerStreamBase&) = delete;
19 
20   // Override the base class to send QUIC_STREAM_NO_ERROR to the peer
21   // when the stream has not received all the data.
22   void CloseWriteSide() override;
23   void StopReading() override;
24 
25  protected:
26   bool ValidateReceivedHeaders(const QuicHeaderList& header_list) override;
27 };
28 
29 }  // namespace quic
30 
31 #endif  // QUICHE_QUIC_CORE_HTTP_QUIC_SPDY_SERVER_STREAM_BASE_H_
32