| 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_SPDY_SPDY_FRAMER_H_ | 5 #ifndef NET_SPDY_SPDY_FRAMER_H_ |
| 6 #define NET_SPDY_SPDY_FRAMER_H_ | 6 #define NET_SPDY_SPDY_FRAMER_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 // |stream_id| The stream receiving data. | 173 // |stream_id| The stream receiving data. |
| 174 // |data| A buffer containing the data received. | 174 // |data| A buffer containing the data received. |
| 175 // |len| The length of the data buffer. | 175 // |len| The length of the data buffer. |
| 176 // When the other side has finished sending data on this stream, | 176 // When the other side has finished sending data on this stream, |
| 177 // this method will be called with a zero-length buffer. | 177 // this method will be called with a zero-length buffer. |
| 178 virtual void OnStreamFrameData(SpdyStreamId stream_id, | 178 virtual void OnStreamFrameData(SpdyStreamId stream_id, |
| 179 const char* data, | 179 const char* data, |
| 180 size_t len, | 180 size_t len, |
| 181 bool fin) = 0; | 181 bool fin) = 0; |
| 182 | 182 |
| 183 // Called when padding is received (padding length field or padding octets). |
| 184 // |stream_id| The stream receiving data. |
| 185 // |len| The number of padding octets. |
| 186 virtual void OnStreamPadding(SpdyStreamId stream_id, size_t len) = 0; |
| 187 |
| 183 // Called when a chunk of header data is available. This is called | 188 // Called when a chunk of header data is available. This is called |
| 184 // after OnSynStream, OnSynReply, OnHeaders(), or OnPushPromise. | 189 // after OnSynStream, OnSynReply, OnHeaders(), or OnPushPromise. |
| 185 // |stream_id| The stream receiving the header data. | 190 // |stream_id| The stream receiving the header data. |
| 186 // |header_data| A buffer containing the header data chunk received. | 191 // |header_data| A buffer containing the header data chunk received. |
| 187 // |len| The length of the header data buffer. A length of zero indicates | 192 // |len| The length of the header data buffer. A length of zero indicates |
| 188 // that the header data block has been completely sent. | 193 // that the header data block has been completely sent. |
| 189 // When this function returns true the visitor indicates that it accepted | 194 // When this function returns true the visitor indicates that it accepted |
| 190 // all of the data. Returning false indicates that that an unrecoverable | 195 // all of the data. Returning false indicates that that an unrecoverable |
| 191 // error has occurred, such as bad header data or resource exhaustion. | 196 // error has occurred, such as bad header data or resource exhaustion. |
| 192 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, | 197 virtual bool OnControlFrameHeaderData(SpdyStreamId stream_id, |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 798 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM | 803 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM |
| 799 // flag is still carried in the HEADERS frame. If it's set, flip this so that | 804 // flag is still carried in the HEADERS frame. If it's set, flip this so that |
| 800 // we know to terminate the stream when the entire header block has been | 805 // we know to terminate the stream when the entire header block has been |
| 801 // processed. | 806 // processed. |
| 802 bool end_stream_when_done_; | 807 bool end_stream_when_done_; |
| 803 }; | 808 }; |
| 804 | 809 |
| 805 } // namespace net | 810 } // namespace net |
| 806 | 811 |
| 807 #endif // NET_SPDY_SPDY_FRAMER_H_ | 812 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |