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 // This file contains some protocol structures for use with SPDY 2 and 3 | 5 // This file contains some protocol structures for use with SPDY 2 and 3 |
6 // The SPDY 2 spec can be found at: | 6 // The SPDY 2 spec can be found at: |
7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft2 |
8 // The SPDY 3 spec can be found at: | 8 // The SPDY 3 spec can be found at: |
9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 9 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
10 | 10 |
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... | 267 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... |
268 }; | 268 }; |
269 const int kHttp2ConnectionHeaderPrefixSize = | 269 const int kHttp2ConnectionHeaderPrefixSize = |
270 arraysize(kHttp2ConnectionHeaderPrefix); | 270 arraysize(kHttp2ConnectionHeaderPrefix); |
271 | 271 |
272 // Types of SPDY frames. | 272 // Types of SPDY frames. |
273 enum SpdyFrameType { | 273 enum SpdyFrameType { |
274 DATA = 0, | 274 DATA = 0, |
275 SYN_STREAM = 1, | 275 SYN_STREAM = 1, |
276 FIRST_CONTROL_TYPE = SYN_STREAM, | 276 FIRST_CONTROL_TYPE = SYN_STREAM, |
| 277 HTTP2_HEADERS = 1, |
277 SYN_REPLY, | 278 SYN_REPLY, |
278 RST_STREAM, | 279 RST_STREAM, |
279 SETTINGS, | 280 SETTINGS, |
280 NOOP, // Because it is valid in SPDY/2, kept for identifiability/enum order. | 281 NOOP, // Because it is valid in SPDY/2, kept for identifiability/enum order. |
281 PING, | 282 PING, |
282 GOAWAY, | 283 GOAWAY, |
283 HEADERS, | 284 HEADERS, |
284 WINDOW_UPDATE, | 285 WINDOW_UPDATE, |
285 CREDENTIAL, | 286 CREDENTIAL, |
286 BLOCKED, | 287 BLOCKED, |
287 PUSH_PROMISE, | 288 PUSH_PROMISE, |
288 LAST_CONTROL_TYPE = PUSH_PROMISE | 289 LAST_CONTROL_TYPE = PUSH_PROMISE |
289 }; | 290 }; |
290 | 291 |
291 // Flags on data packets. | 292 // Flags on data packets. |
292 enum SpdyDataFlags { | 293 enum SpdyDataFlags { |
293 DATA_FLAG_NONE = 0, | 294 DATA_FLAG_NONE = 0, |
294 DATA_FLAG_FIN = 1, | 295 DATA_FLAG_FIN = 1, |
295 }; | 296 }; |
296 | 297 |
297 // Flags on control packets | 298 // Flags on control packets |
298 enum SpdyControlFlags { | 299 enum SpdyControlFlags { |
299 CONTROL_FLAG_NONE = 0, | 300 CONTROL_FLAG_NONE = 0, |
300 CONTROL_FLAG_FIN = 1, | 301 CONTROL_FLAG_FIN = 1, |
301 CONTROL_FLAG_UNIDIRECTIONAL = 2 | 302 CONTROL_FLAG_UNIDIRECTIONAL = 2 |
302 }; | 303 }; |
303 | 304 |
| 305 enum SpdyHeadersFlags { |
| 306 HEADERS_FLAG_END_HEADERS = 0x04, |
| 307 HEADERS_FLAG_PRIORITY = 0x08 |
| 308 }; |
| 309 |
304 // Flags on the SETTINGS control frame. | 310 // Flags on the SETTINGS control frame. |
305 enum SpdySettingsControlFlags { | 311 enum SpdySettingsControlFlags { |
306 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x1 | 312 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x1 |
307 }; | 313 }; |
308 | 314 |
309 // Flags for settings within a SETTINGS frame. | 315 // Flags for settings within a SETTINGS frame. |
310 enum SpdySettingsFlags { | 316 enum SpdySettingsFlags { |
311 SETTINGS_FLAG_NONE = 0x0, | 317 SETTINGS_FLAG_NONE = 0x0, |
312 SETTINGS_FLAG_PLEASE_PERSIST = 0x1, | 318 SETTINGS_FLAG_PLEASE_PERSIST = 0x1, |
313 SETTINGS_FLAG_PERSISTED = 0x2 | 319 SETTINGS_FLAG_PERSISTED = 0x2 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 SpdyFrameVisitor() {} | 801 SpdyFrameVisitor() {} |
796 virtual ~SpdyFrameVisitor() {} | 802 virtual ~SpdyFrameVisitor() {} |
797 | 803 |
798 private: | 804 private: |
799 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 805 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
800 }; | 806 }; |
801 | 807 |
802 } // namespace net | 808 } // namespace net |
803 | 809 |
804 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 810 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
OLD | NEW |