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_QUIC_HEADERS_STREAM_H_ | 5 #ifndef NET_QUIC_QUIC_HEADERS_STREAM_H_ |
6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ | 6 #define NET_QUIC_QUIC_HEADERS_STREAM_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <memory> | 10 #include <memory> |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 QuicAckListenerInterface* ack_listener); | 58 QuicAckListenerInterface* ack_listener); |
59 | 59 |
60 // Write |headers| for |promised_stream_id| on |original_stream_id| in a | 60 // Write |headers| for |promised_stream_id| on |original_stream_id| in a |
61 // PUSH_PROMISE frame to peer. | 61 // PUSH_PROMISE frame to peer. |
62 // Return the size, in bytes, of the resulting PUSH_PROMISE frame. | 62 // Return the size, in bytes, of the resulting PUSH_PROMISE frame. |
63 virtual size_t WritePushPromise(QuicStreamId original_stream_id, | 63 virtual size_t WritePushPromise(QuicStreamId original_stream_id, |
64 QuicStreamId promised_stream_id, | 64 QuicStreamId promised_stream_id, |
65 SpdyHeaderBlock headers, | 65 SpdyHeaderBlock headers, |
66 QuicAckListenerInterface* ack_listener); | 66 QuicAckListenerInterface* ack_listener); |
67 | 67 |
| 68 // For forcing HOL blocking. This encapsulates data from other |
| 69 // streams into HTTP/2 data frames on the headers stream. |
| 70 QuicConsumedData WritevStreamData( |
| 71 QuicStreamId id, |
| 72 QuicIOVector iov, |
| 73 QuicStreamOffset offset, |
| 74 bool fin, |
| 75 QuicAckListenerInterface* ack_notifier_delegate); |
| 76 |
68 // ReliableQuicStream implementation | 77 // ReliableQuicStream implementation |
69 void OnDataAvailable() override; | 78 void OnDataAvailable() override; |
70 | 79 |
71 bool supports_push_promise() { return supports_push_promise_; } | 80 bool supports_push_promise() { return supports_push_promise_; } |
72 | 81 |
73 // Experimental: force HPACK to use static table and huffman coding | 82 // Experimental: force HPACK to use static table and huffman coding |
74 // only. Part of exploring improvements related to headers stream | 83 // only. Part of exploring improvements related to headers stream |
75 // induced HOL blocking in QUIC. | 84 // induced HOL blocking in QUIC. |
76 void DisableHpackDynamicTable(); | 85 void DisableHpackDynamicTable(); |
77 | 86 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 void OnControlFrameHeaderData(SpdyStreamId stream_id, | 125 void OnControlFrameHeaderData(SpdyStreamId stream_id, |
117 const char* header_data, | 126 const char* header_data, |
118 size_t len); | 127 size_t len); |
119 | 128 |
120 // Called when the complete list of headers is available. | 129 // Called when the complete list of headers is available. |
121 void OnHeaderList(const QuicHeaderList& header_list); | 130 void OnHeaderList(const QuicHeaderList& header_list); |
122 | 131 |
123 // Called when the size of the compressed frame payload is available. | 132 // Called when the size of the compressed frame payload is available. |
124 void OnCompressedFrameSize(size_t frame_len); | 133 void OnCompressedFrameSize(size_t frame_len); |
125 | 134 |
| 135 // For force HOL blocking, where stream frames from all streams are |
| 136 // plumbed through headers stream as HTTP/2 data frames. Return false |
| 137 // if force_hol_blocking_ is false; |
| 138 bool OnDataFrameHeader(QuicStreamId stream_id, size_t length, bool fin); |
| 139 bool OnStreamFrameData(QuicStreamId stream_id, const char* data, size_t len); |
| 140 |
126 // Returns true if the session is still connected. | 141 // Returns true if the session is still connected. |
127 bool IsConnected(); | 142 bool IsConnected(); |
128 | 143 |
129 QuicSpdySession* spdy_session_; | 144 QuicSpdySession* spdy_session_; |
130 | 145 |
131 // Data about the stream whose headers are being processed. | 146 // Data about the stream whose headers are being processed. |
132 QuicStreamId stream_id_; | 147 QuicStreamId stream_id_; |
133 QuicStreamId promised_stream_id_; | 148 QuicStreamId promised_stream_id_; |
134 bool fin_; | 149 bool fin_; |
135 size_t frame_len_; | 150 size_t frame_len_; |
(...skipping 17 matching lines...) Expand all Loading... |
153 | 168 |
154 // Either empty, or contains the complete list of headers. | 169 // Either empty, or contains the complete list of headers. |
155 QuicHeaderList header_list_; | 170 QuicHeaderList header_list_; |
156 | 171 |
157 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); | 172 DISALLOW_COPY_AND_ASSIGN(QuicHeadersStream); |
158 }; | 173 }; |
159 | 174 |
160 } // namespace net | 175 } // namespace net |
161 | 176 |
162 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ | 177 #endif // NET_QUIC_QUIC_HEADERS_STREAM_H_ |
OLD | NEW |