| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_QUIC_CORE_QUIC_HEADERS_STREAM_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_HEADERS_STREAM_H_ |
| 6 #define NET_QUIC_CORE_QUIC_HEADERS_STREAM_H_ | 6 #define NET_QUIC_CORE_QUIC_HEADERS_STREAM_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
| 14 #include "net/quic/core/quic_header_list.h" | 14 #include "net/quic/core/quic_header_list.h" |
| 15 #include "net/quic/core/quic_protocol.h" | 15 #include "net/quic/core/quic_protocol.h" |
| 16 #include "net/quic/core/reliable_quic_stream.h" | 16 #include "net/quic/core/quic_stream.h" |
| 17 #include "net/spdy/spdy_framer.h" | 17 #include "net/spdy/spdy_framer.h" |
| 18 | 18 |
| 19 namespace net { | 19 namespace net { |
| 20 | 20 |
| 21 class QuicSpdySession; | 21 class QuicSpdySession; |
| 22 | 22 |
| 23 namespace test { | 23 namespace test { |
| 24 class QuicHeadersStreamPeer; | 24 class QuicHeadersStreamPeer; |
| 25 } // namespace test | 25 } // namespace test |
| 26 | 26 |
| 27 // Headers in QUIC are sent as HTTP/2 HEADERS or PUSH_PROMISE frames | 27 // Headers in QUIC are sent as HTTP/2 HEADERS or PUSH_PROMISE frames |
| 28 // over a reserved reliable stream with the id 3. Each endpoint | 28 // over a reserved reliable stream with the id 3. Each endpoint |
| 29 // (client and server) will allocate an instance of QuicHeadersStream | 29 // (client and server) will allocate an instance of QuicHeadersStream |
| 30 // to send and receive headers. | 30 // to send and receive headers. |
| 31 class NET_EXPORT_PRIVATE QuicHeadersStream : public ReliableQuicStream { | 31 class NET_EXPORT_PRIVATE QuicHeadersStream : public QuicStream { |
| 32 public: | 32 public: |
| 33 class NET_EXPORT_PRIVATE HpackDebugVisitor { | 33 class NET_EXPORT_PRIVATE HpackDebugVisitor { |
| 34 public: | 34 public: |
| 35 HpackDebugVisitor(); | 35 HpackDebugVisitor(); |
| 36 | 36 |
| 37 virtual ~HpackDebugVisitor(); | 37 virtual ~HpackDebugVisitor(); |
| 38 | 38 |
| 39 // For each HPACK indexed representation processed, |elapsed| is | 39 // For each HPACK indexed representation processed, |elapsed| is |
| 40 // the time since the corresponding entry was added to the dynamic | 40 // the time since the corresponding entry was added to the dynamic |
| 41 // table. | 41 // table. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 66 | 66 |
| 67 // For forcing HOL blocking. This encapsulates data from other | 67 // For forcing HOL blocking. This encapsulates data from other |
| 68 // streams into HTTP/2 data frames on the headers stream. | 68 // streams into HTTP/2 data frames on the headers stream. |
| 69 QuicConsumedData WritevStreamData( | 69 QuicConsumedData WritevStreamData( |
| 70 QuicStreamId id, | 70 QuicStreamId id, |
| 71 QuicIOVector iov, | 71 QuicIOVector iov, |
| 72 QuicStreamOffset offset, | 72 QuicStreamOffset offset, |
| 73 bool fin, | 73 bool fin, |
| 74 QuicAckListenerInterface* ack_notifier_delegate); | 74 QuicAckListenerInterface* ack_notifier_delegate); |
| 75 | 75 |
| 76 // ReliableQuicStream implementation | 76 // QuicStream implementation |
| 77 void OnDataAvailable() override; | 77 void OnDataAvailable() override; |
| 78 | 78 |
| 79 bool supports_push_promise() { return supports_push_promise_; } | 79 bool supports_push_promise() { return supports_push_promise_; } |
| 80 | 80 |
| 81 // Experimental: force HPACK to use static table and huffman coding | 81 // Experimental: force HPACK to use static table and huffman coding |
| 82 // only. Part of exploring improvements related to headers stream | 82 // only. Part of exploring improvements related to headers stream |
| 83 // induced HOL blocking in QUIC. | 83 // induced HOL blocking in QUIC. |
| 84 void DisableHpackDynamicTable(); | 84 void DisableHpackDynamicTable(); |
| 85 | 85 |
| 86 // Optional, enables instrumentation related to go/quic-hpack. | 86 // Optional, enables instrumentation related to go/quic-hpack. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 162 | 162 |
| 163 SpdyFramer spdy_framer_; | 163 SpdyFramer spdy_framer_; |
| 164 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; | 164 std::unique_ptr<SpdyFramerVisitor> spdy_framer_visitor_; |
| 165 | 165 |
| 166 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); | 166 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 } // namespace net | 169 } // namespace net |
| 170 | 170 |
| 171 #endif // NET_QUIC_CORE_QUIC_HEADERS_STREAM_H_ | 171 #endif // NET_QUIC_CORE_QUIC_HEADERS_STREAM_H_ |
| OLD | NEW |