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 "base/strings/string_piece.h" | 13 #include "base/strings/string_piece.h" |
14 #include "net/quic/core/quic_protocol.h" | 14 #include "net/quic/core/quic_protocol.h" |
15 #include "net/quic/core/quic_spdy_stream.h" | 15 #include "net/quic/core/quic_spdy_stream.h" |
16 #include "net/spdy/spdy_framer.h" | 16 #include "net/spdy/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 | 29 // Override the base class to close the write side as soon as we get a |
30 // response. | 30 // response (if bidirectional streaming is not enabled). |
31 // SPDY/HTTP does not support bidirectional streaming. | |
32 void OnStreamFrame(const QuicStreamFrame& frame) override; | 31 void OnStreamFrame(const QuicStreamFrame& frame) override; |
33 | 32 |
34 // Override the base class to parse and store headers. | 33 // Override the base class to parse and store headers. |
35 void OnInitialHeadersComplete(bool fin, | 34 void OnInitialHeadersComplete(bool fin, |
36 size_t frame_len, | 35 size_t frame_len, |
37 const QuicHeaderList& header_list) override; | 36 const QuicHeaderList& header_list) override; |
38 | 37 |
39 // Override the base class to parse and store trailers. | 38 // Override the base class to parse and store trailers. |
40 void OnTrailingHeadersComplete(bool fin, | 39 void OnTrailingHeadersComplete(bool fin, |
41 size_t frame_len, | 40 size_t frame_len, |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 size_t header_bytes_written_; | 80 size_t header_bytes_written_; |
82 | 81 |
83 QuicClientSession* session_; | 82 QuicClientSession* session_; |
84 | 83 |
85 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); | 84 DISALLOW_COPY_AND_ASSIGN(QuicSpdyClientStream); |
86 }; | 85 }; |
87 | 86 |
88 } // namespace net | 87 } // namespace net |
89 | 88 |
90 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ | 89 #endif // NET_TOOLS_QUIC_QUIC_SPDY_CLIENT_STREAM_H_ |
OLD | NEW |