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 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 CONTINUATION, | 289 CONTINUATION, |
290 ALTSVC, | 290 ALTSVC, |
291 LAST_CONTROL_TYPE = ALTSVC | 291 LAST_CONTROL_TYPE = ALTSVC |
292 }; | 292 }; |
293 | 293 |
294 // Flags on data packets. | 294 // Flags on data packets. |
295 enum SpdyDataFlags { | 295 enum SpdyDataFlags { |
296 DATA_FLAG_NONE = 0x00, | 296 DATA_FLAG_NONE = 0x00, |
297 DATA_FLAG_FIN = 0x01, | 297 DATA_FLAG_FIN = 0x01, |
298 DATA_FLAG_END_SEGMENT = 0x02, | 298 DATA_FLAG_END_SEGMENT = 0x02, |
299 DATA_FLAG_PAD_LOW = 0x10, | 299 DATA_FLAG_PAD_LOW = 0x08, |
300 DATA_FLAG_PAD_HIGH = 0x20 | 300 DATA_FLAG_PAD_HIGH = 0x10, |
| 301 DATA_FLAG_COMPRESSED = 0x20, |
301 }; | 302 }; |
302 | 303 |
303 // Flags on control packets | 304 // Flags on control packets |
304 enum SpdyControlFlags { | 305 enum SpdyControlFlags { |
305 CONTROL_FLAG_NONE = 0, | 306 CONTROL_FLAG_NONE = 0x00, |
306 CONTROL_FLAG_FIN = 1, | 307 CONTROL_FLAG_FIN = 0x01, |
307 CONTROL_FLAG_UNIDIRECTIONAL = 2 | 308 CONTROL_FLAG_UNIDIRECTIONAL = 0x02, |
308 }; | 309 }; |
309 | 310 |
310 enum SpdyPingFlags { | 311 enum SpdyPingFlags { |
311 PING_FLAG_ACK = 0x1, | 312 PING_FLAG_ACK = 0x01, |
312 }; | 313 }; |
313 | 314 |
| 315 // Used by HEADERS, PUSH_PROMISE, and CONTINUATION. |
314 enum SpdyHeadersFlags { | 316 enum SpdyHeadersFlags { |
315 HEADERS_FLAG_END_HEADERS = 0x4, | 317 HEADERS_FLAG_END_SEGMENT = 0x02, |
316 HEADERS_FLAG_PRIORITY = 0x8 | 318 HEADERS_FLAG_END_HEADERS = 0x04, |
| 319 HEADERS_FLAG_PAD_LOW = 0x08, |
| 320 HEADERS_FLAG_PAD_HIGH = 0x10, |
| 321 HEADERS_FLAG_PRIORITY = 0x20, |
317 }; | 322 }; |
318 | 323 |
319 enum SpdyPushPromiseFlags { | 324 enum SpdyPushPromiseFlags { |
320 PUSH_PROMISE_FLAG_END_PUSH_PROMISE = 0x4 | 325 PUSH_PROMISE_FLAG_END_PUSH_PROMISE = 0x04, |
321 }; | 326 }; |
322 | 327 |
323 // Flags on the SETTINGS control frame. | 328 // Flags on the SETTINGS control frame. |
324 enum SpdySettingsControlFlags { | 329 enum SpdySettingsControlFlags { |
325 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x1 | 330 SETTINGS_FLAG_CLEAR_PREVIOUSLY_PERSISTED_SETTINGS = 0x01, |
326 }; | 331 }; |
327 | 332 |
328 enum Http2SettingsControlFlags { | 333 enum Http2SettingsControlFlags { |
329 SETTINGS_FLAG_ACK = 0x1, | 334 SETTINGS_FLAG_ACK = 0x01, |
330 }; | 335 }; |
331 | 336 |
332 // Flags for settings within a SETTINGS frame. | 337 // Flags for settings within a SETTINGS frame. |
333 enum SpdySettingsFlags { | 338 enum SpdySettingsFlags { |
334 SETTINGS_FLAG_NONE = 0x0, | 339 SETTINGS_FLAG_NONE = 0x00, |
335 SETTINGS_FLAG_PLEASE_PERSIST = 0x1, | 340 SETTINGS_FLAG_PLEASE_PERSIST = 0x01, |
336 SETTINGS_FLAG_PERSISTED = 0x2 | 341 SETTINGS_FLAG_PERSISTED = 0x02, |
337 }; | 342 }; |
338 | 343 |
339 // List of known settings. Avoid changing these enum values, as persisted | 344 // List of known settings. Avoid changing these enum values, as persisted |
340 // settings are keyed on them, and they are also exposed in net-internals. | 345 // settings are keyed on them, and they are also exposed in net-internals. |
341 enum SpdySettingsIds { | 346 enum SpdySettingsIds { |
342 SETTINGS_UPLOAD_BANDWIDTH = 0x1, | 347 SETTINGS_UPLOAD_BANDWIDTH = 0x1, |
343 SETTINGS_DOWNLOAD_BANDWIDTH = 0x2, | 348 SETTINGS_DOWNLOAD_BANDWIDTH = 0x2, |
344 // Network round trip time in milliseconds. | 349 // Network round trip time in milliseconds. |
345 SETTINGS_ROUND_TRIP_TIME = 0x3, | 350 SETTINGS_ROUND_TRIP_TIME = 0x3, |
346 // The maximum number of simultaneous live streams in each direction. | 351 // The maximum number of simultaneous live streams in each direction. |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 SpdyFrameVisitor() {} | 1025 SpdyFrameVisitor() {} |
1021 virtual ~SpdyFrameVisitor() {} | 1026 virtual ~SpdyFrameVisitor() {} |
1022 | 1027 |
1023 private: | 1028 private: |
1024 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 1029 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
1025 }; | 1030 }; |
1026 | 1031 |
1027 } // namespace net | 1032 } // namespace net |
1028 | 1033 |
1029 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 1034 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
OLD | NEW |