| 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 SpdyError error_code_; | 729 SpdyError error_code_; |
| 730 | 730 |
| 731 // Note that for DATA frame, remaining_data_length_ is sum of lengths of | 731 // Note that for DATA frame, remaining_data_length_ is sum of lengths of |
| 732 // frame header, padding length field (optional), data payload (optional) and | 732 // frame header, padding length field (optional), data payload (optional) and |
| 733 // padding payload (optional). | 733 // padding payload (optional). |
| 734 size_t remaining_data_length_; | 734 size_t remaining_data_length_; |
| 735 | 735 |
| 736 // The length (in bytes) of the padding payload to be processed. | 736 // The length (in bytes) of the padding payload to be processed. |
| 737 size_t remaining_padding_payload_length_; | 737 size_t remaining_padding_payload_length_; |
| 738 | 738 |
| 739 // The length (in bytes) of the padding length field to be processed. | |
| 740 size_t remaining_padding_length_fields_; | |
| 741 | |
| 742 // The number of bytes remaining to read from the current control frame's | 739 // The number of bytes remaining to read from the current control frame's |
| 743 // headers. Note that header data blocks (for control types that have them) | 740 // headers. Note that header data blocks (for control types that have them) |
| 744 // are part of the frame's payload, and not the frame's headers. | 741 // are part of the frame's payload, and not the frame's headers. |
| 745 size_t remaining_control_header_; | 742 size_t remaining_control_header_; |
| 746 | 743 |
| 747 scoped_ptr<char[]> current_frame_buffer_; | 744 scoped_ptr<char[]> current_frame_buffer_; |
| 748 // Number of bytes read into the current_frame_buffer_. | 745 // Number of bytes read into the current_frame_buffer_. |
| 749 size_t current_frame_buffer_length_; | 746 size_t current_frame_buffer_length_; |
| 750 | 747 |
| 751 // The type of the frame currently being read. | 748 // The type of the frame currently being read. |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 807 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM | 804 // If a HEADERS frame is followed by a CONTINUATION frame, the FIN/END_STREAM |
| 808 // flag is still carried in the HEADERS frame. If it's set, flip this so that | 805 // flag is still carried in the HEADERS frame. If it's set, flip this so that |
| 809 // we know to terminate the stream when the entire header block has been | 806 // we know to terminate the stream when the entire header block has been |
| 810 // processed. | 807 // processed. |
| 811 bool end_stream_when_done_; | 808 bool end_stream_when_done_; |
| 812 }; | 809 }; |
| 813 | 810 |
| 814 } // namespace net | 811 } // namespace net |
| 815 | 812 |
| 816 #endif // NET_SPDY_SPDY_FRAMER_H_ | 813 #endif // NET_SPDY_SPDY_FRAMER_H_ |
| OLD | NEW |