1 // Copyright 2021 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_SERVER_INITIATED_SPDY_STREAM_H_ 6 #define QUICHE_QUIC_CORE_HTTP_QUIC_SERVER_INITIATED_SPDY_STREAM_H_ 7 8 #include "quiche/quic/core/http/quic_spdy_stream.h" 9 #include "quiche/spdy/core/http2_header_block.h" 10 11 namespace quic { 12 13 // QuicServerInitiatedSpdyStream is a subclass of QuicSpdyStream meant to handle 14 // WebTransport traffic on server-initiated bidirectional streams. Receiving or 15 // sending any other traffic on this stream will result in a CONNECTION_CLOSE. 16 class QUICHE_EXPORT QuicServerInitiatedSpdyStream : public QuicSpdyStream { 17 public: 18 using QuicSpdyStream::QuicSpdyStream; 19 20 void OnBodyAvailable() override; 21 size_t WriteHeaders( 22 spdy::Http2HeaderBlock header_block, bool fin, 23 quiche::QuicheReferenceCountedPointer<QuicAckListenerInterface> 24 ack_listener) override; 25 void OnInitialHeadersComplete(bool fin, size_t frame_len, 26 const QuicHeaderList& header_list) override; 27 }; 28 29 } // namespace quic 30 31 #endif // QUICHE_QUIC_CORE_HTTP_QUIC_SERVER_INITIATED_SPDY_STREAM_H_ 32