| 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 SETTINGS_MAX_HEADER_LIST_SIZE = 0x6, | 146 SETTINGS_MAX_HEADER_LIST_SIZE = 0x6, |
| 147 SETTINGS_MAX = SETTINGS_MAX_HEADER_LIST_SIZE | 147 SETTINGS_MAX = SETTINGS_MAX_HEADER_LIST_SIZE |
| 148 }; | 148 }; |
| 149 | 149 |
| 150 using SettingsMap = std::map<SpdySettingsIds, uint32_t>; | 150 using SettingsMap = std::map<SpdySettingsIds, uint32_t>; |
| 151 | 151 |
| 152 // Status codes for RST_STREAM frames. | 152 // Status codes for RST_STREAM frames. |
| 153 enum SpdyRstStreamStatus { | 153 enum SpdyRstStreamStatus { |
| 154 RST_STREAM_NO_ERROR = 0, | 154 RST_STREAM_NO_ERROR = 0, |
| 155 RST_STREAM_PROTOCOL_ERROR = 1, | 155 RST_STREAM_PROTOCOL_ERROR = 1, |
| 156 RST_STREAM_INVALID_STREAM = 2, | 156 RST_STREAM_INTERNAL_ERROR = 2, |
| 157 RST_STREAM_STREAM_CLOSED = 2, // Equivalent to INVALID_STREAM | 157 RST_STREAM_FLOW_CONTROL_ERROR = 3, |
| 158 RST_STREAM_REFUSED_STREAM = 3, | 158 RST_STREAM_SETTINGS_TIMEOUT = 4, |
| 159 RST_STREAM_UNSUPPORTED_VERSION = 4, | 159 RST_STREAM_STREAM_CLOSED = 5, |
| 160 RST_STREAM_CANCEL = 5, | 160 RST_STREAM_FRAME_SIZE_ERROR = 6, |
| 161 RST_STREAM_INTERNAL_ERROR = 6, | 161 RST_STREAM_REFUSED_STREAM = 7, |
| 162 RST_STREAM_FLOW_CONTROL_ERROR = 7, | 162 RST_STREAM_CANCEL = 8, |
| 163 RST_STREAM_STREAM_IN_USE = 8, | 163 RST_STREAM_COMPRESSION_ERROR = 9, |
| 164 RST_STREAM_STREAM_ALREADY_CLOSED = 9, | 164 RST_STREAM_CONNECT_ERROR = 10, |
| 165 // FRAME_TOO_LARGE (defined by SPDY versions 3.1 and below), and | 165 RST_STREAM_ENHANCE_YOUR_CALM = 11, |
| 166 // FRAME_SIZE_ERROR (defined by HTTP/2) are mapped to the same internal | 166 RST_STREAM_INADEQUATE_SECURITY = 12, |
| 167 // reset status. | 167 RST_STREAM_HTTP_1_1_REQUIRED = 13, |
| 168 RST_STREAM_FRAME_TOO_LARGE = 11, | 168 RST_STREAM_NUM_STATUS_CODES = 14 |
| 169 RST_STREAM_FRAME_SIZE_ERROR = 11, | |
| 170 RST_STREAM_SETTINGS_TIMEOUT = 12, | |
| 171 RST_STREAM_CONNECT_ERROR = 13, | |
| 172 RST_STREAM_ENHANCE_YOUR_CALM = 14, | |
| 173 RST_STREAM_INADEQUATE_SECURITY = 15, | |
| 174 RST_STREAM_HTTP_1_1_REQUIRED = 16, | |
| 175 RST_STREAM_NUM_STATUS_CODES = 17 | |
| 176 }; | 169 }; |
| 177 | 170 |
| 178 // Status codes for GOAWAY frames. | 171 // Status codes for GOAWAY frames. |
| 179 enum SpdyGoAwayStatus { | 172 enum SpdyGoAwayStatus { |
| 180 GOAWAY_OK = 0, | 173 GOAWAY_NO_ERROR = 0, |
| 181 GOAWAY_NO_ERROR = GOAWAY_OK, | |
| 182 GOAWAY_PROTOCOL_ERROR = 1, | 174 GOAWAY_PROTOCOL_ERROR = 1, |
| 183 GOAWAY_INTERNAL_ERROR = 2, | 175 GOAWAY_INTERNAL_ERROR = 2, |
| 184 GOAWAY_FLOW_CONTROL_ERROR = 3, | 176 GOAWAY_FLOW_CONTROL_ERROR = 3, |
| 185 GOAWAY_SETTINGS_TIMEOUT = 4, | 177 GOAWAY_SETTINGS_TIMEOUT = 4, |
| 186 GOAWAY_STREAM_CLOSED = 5, | 178 GOAWAY_STREAM_CLOSED = 5, |
| 187 GOAWAY_FRAME_SIZE_ERROR = 6, | 179 GOAWAY_FRAME_SIZE_ERROR = 6, |
| 188 GOAWAY_REFUSED_STREAM = 7, | 180 GOAWAY_REFUSED_STREAM = 7, |
| 189 GOAWAY_CANCEL = 8, | 181 GOAWAY_CANCEL = 8, |
| 190 GOAWAY_COMPRESSION_ERROR = 9, | 182 GOAWAY_COMPRESSION_ERROR = 9, |
| 191 GOAWAY_CONNECT_ERROR = 10, | 183 GOAWAY_CONNECT_ERROR = 10, |
| (...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 SpdyFrameVisitor() {} | 939 SpdyFrameVisitor() {} |
| 948 virtual ~SpdyFrameVisitor() {} | 940 virtual ~SpdyFrameVisitor() {} |
| 949 | 941 |
| 950 private: | 942 private: |
| 951 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); | 943 DISALLOW_COPY_AND_ASSIGN(SpdyFrameVisitor); |
| 952 }; | 944 }; |
| 953 | 945 |
| 954 } // namespace net | 946 } // namespace net |
| 955 | 947 |
| 956 #endif // NET_SPDY_SPDY_PROTOCOL_H_ | 948 #endif // NET_SPDY_SPDY_PROTOCOL_H_ |
| OLD | NEW |