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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // frame. Set to -1 before first key/value pair is processed. | 100 // frame. Set to -1 before first key/value pair is processed. |
101 int last_setting_id; | 101 int last_setting_id; |
102 }; | 102 }; |
103 | 103 |
104 // Scratch space necessary for processing ALTSVC frames. | 104 // Scratch space necessary for processing ALTSVC frames. |
105 struct NET_EXPORT_PRIVATE SpdyAltSvcScratch { | 105 struct NET_EXPORT_PRIVATE SpdyAltSvcScratch { |
106 SpdyAltSvcScratch(); | 106 SpdyAltSvcScratch(); |
107 ~SpdyAltSvcScratch(); | 107 ~SpdyAltSvcScratch(); |
108 | 108 |
109 void Reset() { | 109 void Reset() { |
110 max_age = 0; | 110 buffer.reset(); |
111 port = 0; | 111 buffer_length = 0; |
112 pid_len = 0; | |
113 host_len = 0; | |
114 origin_len = 0; | |
115 pid_buf_len = 0; | |
116 host_buf_len = 0; | |
117 origin_buf_len = 0; | |
118 protocol_id.reset(); | |
119 host.reset(); | |
120 origin.reset(); | |
121 } | 112 } |
122 | 113 |
123 uint32 max_age; | 114 scoped_ptr<char[]> buffer; |
124 uint16 port; | 115 size_t buffer_length = 0; |
125 uint8 pid_len; | |
126 uint8 host_len; | |
127 size_t origin_len; | |
128 size_t pid_buf_len; | |
129 size_t host_buf_len; | |
130 size_t origin_buf_len; | |
131 scoped_ptr<char[]> protocol_id; | |
132 scoped_ptr<char[]> host; | |
133 scoped_ptr<char[]> origin; | |
134 }; | 116 }; |
135 | 117 |
136 // SpdyFramerVisitorInterface is a set of callbacks for the SpdyFramer. | 118 // SpdyFramerVisitorInterface is a set of callbacks for the SpdyFramer. |
137 // Implement this interface to receive event callbacks as frames are | 119 // Implement this interface to receive event callbacks as frames are |
138 // decoded from the framer. | 120 // decoded from the framer. |
139 // | 121 // |
140 // Control frames that contain SPDY header blocks (SYN_STREAM, SYN_REPLY, | 122 // Control frames that contain SPDY header blocks (SYN_STREAM, SYN_REPLY, |
141 // HEADER, and PUSH_PROMISE) are processed in fashion that allows the | 123 // HEADER, and PUSH_PROMISE) are processed in fashion that allows the |
142 // decompressed header block to be delivered in chunks to the visitor. | 124 // decompressed header block to be delivered in chunks to the visitor. |
143 // The following steps are followed: | 125 // The following steps are followed: |
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 // processed. | 794 // processed. |
813 bool end_stream_when_done_; | 795 bool end_stream_when_done_; |
814 | 796 |
815 // Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE. | 797 // Last acknowledged value for SETTINGS_HEADER_TABLE_SIZE. |
816 size_t header_table_size_bound_; | 798 size_t header_table_size_bound_; |
817 }; | 799 }; |
818 | 800 |
819 } // namespace net | 801 } // namespace net |
820 | 802 |
821 #endif // NET_SPDY_SPDY_FRAMER_H_ | 803 #endif // NET_SPDY_SPDY_FRAMER_H_ |
OLD | NEW |