| 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 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 uint32 max_age, | 282 uint32 max_age, |
| 283 uint16 port, | 283 uint16 port, |
| 284 base::StringPiece protocol_id, | 284 base::StringPiece protocol_id, |
| 285 base::StringPiece host, | 285 base::StringPiece host, |
| 286 base::StringPiece origin) {} | 286 base::StringPiece origin) {} |
| 287 | 287 |
| 288 // Called when a PRIORITY frame is received. | 288 // Called when a PRIORITY frame is received. |
| 289 virtual void OnPriority(SpdyStreamId stream_id, | 289 virtual void OnPriority(SpdyStreamId stream_id, |
| 290 SpdyStreamId parent_stream_id, | 290 SpdyStreamId parent_stream_id, |
| 291 uint8 weight, | 291 uint8 weight, |
| 292 bool exclusive) {}; | 292 bool exclusive) {} |
| 293 |
| 294 // Called when a frame type we don't recognize is received. |
| 295 // Return true if this appears to be a valid extension frame, false otherwise. |
| 296 // We distinguish between extension frames and nonsense by checking |
| 297 // whether the stream id is valid. |
| 298 virtual bool OnUnknownFrame(SpdyStreamId stream_id, int frame_type) = 0; |
| 293 }; | 299 }; |
| 294 | 300 |
| 295 // Optionally, and in addition to SpdyFramerVisitorInterface, a class supporting | 301 // Optionally, and in addition to SpdyFramerVisitorInterface, a class supporting |
| 296 // SpdyFramerDebugVisitorInterface may be used in conjunction with SpdyFramer in | 302 // SpdyFramerDebugVisitorInterface may be used in conjunction with SpdyFramer in |
| 297 // order to extract debug/internal information about the SpdyFramer as it | 303 // order to extract debug/internal information about the SpdyFramer as it |
| 298 // operates. | 304 // operates. |
| 299 // | 305 // |
| 300 // Most SPDY implementations need not bother with this interface at all. | 306 // Most SPDY implementations need not bother with this interface at all. |
| 301 class NET_EXPORT_PRIVATE SpdyFramerDebugVisitorInterface { | 307 class NET_EXPORT_PRIVATE SpdyFramerDebugVisitorInterface { |
| 302 public: | 308 public: |
| (...skipping 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM | 816 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM |
| 811 // flag is still carried in the HEADERS frame. If it's set, flip this so that | 817 // flag is still carried in the HEADERS frame. If it's set, flip this so that |
| 812 // we know to terminate the stream when the entire header block has been | 818 // we know to terminate the stream when the entire header block has been |
| 813 // processed. | 819 // processed. |
| 814 bool end_stream_when_done_; | 820 bool end_stream_when_done_; |
| 815 }; | 821 }; |
| 816 | 822 |
| 817 } // namespace net | 823 } // namespace net |
| 818 | 824 |
| 819 #endif // NET_SPDY_SPDY_FRAMER_H_ | 825 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |