| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 5 #ifndef NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 6 #define NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <sys/types.h> | 9 #include <sys/types.h> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "net/quic/core/quic_packets.h" | 13 #include "net/quic/core/quic_packets.h" |
| 14 #include "net/quic/core/quic_spdy_stream.h" | 14 #include "net/quic/core/quic_spdy_stream.h" |
| 15 #include "net/quic/platform/api/quic_string_piece.h" | 15 #include "net/quic/platform/api/quic_string_piece.h" |
| 16 #include "net/spdy/core/spdy_framer.h" | 16 #include "net/spdy/core/spdy_framer.h" |
| 17 | 17 |
| 18 namespace net { | 18 namespace net { |
| 19 | 19 |
| 20 class QuicClientSession; | 20 class QuicClientSession; |
| 21 | 21 |
| 22 // All this does right now is send an SPDY request, and aggregate the | 22 // All this does right now is send an SPDY request, and aggregate the |
| 23 // SPDY response. | 23 // SPDY response. |
| 24 class QuicSpdyClientStream : public QuicSpdyStream { | 24 class QuicSpdyClientStream : public QuicSpdyStream { |
| 25 public: | 25 public: |
| 26 QuicSpdyClientStream(QuicStreamId id, QuicClientSession* session); | 26 QuicSpdyClientStream(QuicStreamId id, QuicClientSession* session); |
| 27 ~QuicSpdyClientStream() override; | 27 ~QuicSpdyClientStream() override; |
| 28 | 28 |
| 29 // Override the base class to close the write side as soon as we get a | |
| 30 // response (if bidirectional streaming is not enabled). | |
| 31 void OnStreamFrame(const QuicStreamFrame& frame) override; | |
| 32 | |
| 33 // Override the base class to parse and store headers. | 29 // Override the base class to parse and store headers. |
| 34 void OnInitialHeadersComplete(bool fin, | 30 void OnInitialHeadersComplete(bool fin, |
| 35 size_t frame_len, | 31 size_t frame_len, |
| 36 const QuicHeaderList& header_list) override; | 32 const QuicHeaderList& header_list) override; |
| 37 | 33 |
| 38 // Override the base class to parse and store trailers. | 34 // Override the base class to parse and store trailers. |
| 39 void OnTrailingHeadersComplete(bool fin, | 35 void OnTrailingHeadersComplete(bool fin, |
| 40 size_t frame_len, | 36 size_t frame_len, |
| 41 const QuicHeaderList& header_list) override; | 37 const QuicHeaderList& header_list) override; |
| 42 | 38 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 // Expect: 100-continue. | 84 // Expect: 100-continue. |
| 89 bool has_preliminary_headers_; | 85 bool has_preliminary_headers_; |
| 90 SpdyHeaderBlock preliminary_headers_; | 86 SpdyHeaderBlock preliminary_headers_; |
| 91 | 87 |
| 92 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 88 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
| 93 }; | 89 }; |
| 94 | 90 |
| 95 } // namespace net | 91 } // namespace net |
| 96 | 92 |
| 97 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 93 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
| OLD | NEW |