| 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 3 and HTTP 2 | 5 // This file contains some protocol structures for use with SPDY 3 and HTTP 2 |
| 6 // The SPDY 3 spec can be found at: | 6 // The SPDY 3 spec can be found at: |
| 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 | 7 // http://dev.chromium.org/spdy/spdy-protocol/spdy-protocol-draft3 |
| 8 | 8 |
| 9 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ | 9 #ifndef NET_SPDY_SPDY_PROTOCOL_H_ |
| 10 #define NET_SPDY_SPDY_PROTOCOL_H_ | 10 #define NET_SPDY_SPDY_PROTOCOL_H_ |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 const char kHttp2ConnectionHeaderPrefix[] = { | 67 const char kHttp2ConnectionHeaderPrefix[] = { |
| 68 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54, // PRI * HT | 68 0x50, 0x52, 0x49, 0x20, 0x2a, 0x20, 0x48, 0x54, // PRI * HT |
| 69 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a, // TP/2.0.. | 69 0x54, 0x50, 0x2f, 0x32, 0x2e, 0x30, 0x0d, 0x0a, // TP/2.0.. |
| 70 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... | 70 0x0d, 0x0a, 0x53, 0x4d, 0x0d, 0x0a, 0x0d, 0x0a // ..SM.... |
| 71 }; | 71 }; |
| 72 const int kHttp2ConnectionHeaderPrefixSize = | 72 const int kHttp2ConnectionHeaderPrefixSize = |
| 73 arraysize(kHttp2ConnectionHeaderPrefix); | 73 arraysize(kHttp2ConnectionHeaderPrefix); |
| 74 | 74 |
| 75 // Types of HTTP2 frames. | 75 // Types of HTTP2 frames. |
| 76 enum SpdyFrameType { | 76 enum SpdyFrameType { |
| 77 DATA, | 77 DATA = 0x00, |
| 78 RST_STREAM, | 78 MIN_FRAME_TYPE = DATA, |
| 79 SETTINGS, | 79 HEADERS = 0x01, |
| 80 PING, | 80 PRIORITY = 0x02, |
| 81 GOAWAY, | 81 RST_STREAM = 0x03, |
| 82 HEADERS, | 82 SETTINGS = 0x04, |
| 83 WINDOW_UPDATE, | 83 PUSH_PROMISE = 0x05, |
| 84 PUSH_PROMISE, | 84 PING = 0x06, |
| 85 CONTINUATION, | 85 GOAWAY = 0x07, |
| 86 PRIORITY, | 86 WINDOW_UPDATE = 0x08, |
| 87 // BLOCKED and ALTSVC are recognized extensions. | 87 CONTINUATION = 0x09, |
| 88 BLOCKED, | 88 // ALTSVC and BLOCKED are recognized extensions. |
| 89 ALTSVC, | 89 ALTSVC = 0x0a, |
| 90 BLOCKED = 0x0b, |
| 91 MAX_FRAME_TYPE = BLOCKED |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 // Flags on data packets. | 94 // Flags on data packets. |
| 93 enum SpdyDataFlags { | 95 enum SpdyDataFlags { |
| 94 DATA_FLAG_NONE = 0x00, | 96 DATA_FLAG_NONE = 0x00, |
| 95 DATA_FLAG_FIN = 0x01, | 97 DATA_FLAG_FIN = 0x01, |
| 96 DATA_FLAG_PADDED = 0x08, | 98 DATA_FLAG_PADDED = 0x08, |
| 97 }; | 99 }; |
| 98 | 100 |
| 99 // Flags on control packets | 101 // Flags on control packets |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 945 SpdyFrameVisitor() {} | 947 SpdyFrameVisitor() {} |
| 946 virtual ~SpdyFrameVisitor() {} | 948 virtual ~SpdyFrameVisitor() {} |
| 947 | 949 |
| 948 private: | 950 private: |
| 949 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 951 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 950 }; | 952 }; |
| 951 | 953 |
| 952 } // namespace net | 954 } // namespace net |
| 953 | 955 |
| 954 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 956 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |