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_QUIC_QUIC_PROTOCOL_H_ | 5 #ifndef NET_QUIC_QUIC_PROTOCOL_H_ |
6 #define NET_QUIC_QUIC_PROTOCOL_H_ | 6 #define NET_QUIC_QUIC_PROTOCOL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <limits> | 9 #include <limits> |
10 #include <list> | 10 #include <list> |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // When adding a new version to this enum you should add it to | 305 // When adding a new version to this enum you should add it to |
306 // kSupportedQuicVersions (if appropriate), and also add a new case to the | 306 // kSupportedQuicVersions (if appropriate), and also add a new case to the |
307 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and | 307 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and |
308 // QuicVersionToString. | 308 // QuicVersionToString. |
309 enum QuicVersion { | 309 enum QuicVersion { |
310 // Special case to indicate unknown/unsupported QUIC version. | 310 // Special case to indicate unknown/unsupported QUIC version. |
311 QUIC_VERSION_UNSUPPORTED = 0, | 311 QUIC_VERSION_UNSUPPORTED = 0, |
312 | 312 |
313 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. | 313 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. |
314 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. | 314 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. |
| 315 QUIC_VERSION_24 = 24, // SPDY/4 header compression. |
315 }; | 316 }; |
316 | 317 |
317 // This vector contains QUIC versions which we currently support. | 318 // This vector contains QUIC versions which we currently support. |
318 // This should be ordered such that the highest supported version is the first | 319 // This should be ordered such that the highest supported version is the first |
319 // element, with subsequent elements in descending order (versions can be | 320 // element, with subsequent elements in descending order (versions can be |
320 // skipped as necessary). | 321 // skipped as necessary). |
321 // | 322 // |
322 // IMPORTANT: if you are adding to this list, follow the instructions at | 323 // IMPORTANT: if you are adding to this list, follow the instructions at |
323 // http://sites/quic/adding-and-removing-versions | 324 // http://sites/quic/adding-and-removing-versions |
324 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, | 325 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_24, |
| 326 QUIC_VERSION_23, |
325 QUIC_VERSION_22}; | 327 QUIC_VERSION_22}; |
326 | 328 |
327 typedef std::vector<QuicVersion> QuicVersionVector; | 329 typedef std::vector<QuicVersion> QuicVersionVector; |
328 | 330 |
329 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 331 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
330 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 332 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
331 | 333 |
332 // QuicTag is written to and read from the wire, but we prefer to use | 334 // QuicTag is written to and read from the wire, but we prefer to use |
333 // the more readable QuicVersion at other levels. | 335 // the more readable QuicVersion at other levels. |
334 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 336 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
(...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1097 bool in_flight; | 1099 bool in_flight; |
1098 // True if the packet can never be acked, so it can be removed. | 1100 // True if the packet can never be acked, so it can be removed. |
1099 bool is_unackable; | 1101 bool is_unackable; |
1100 // True if the packet is an FEC packet. | 1102 // True if the packet is an FEC packet. |
1101 bool is_fec_packet; | 1103 bool is_fec_packet; |
1102 }; | 1104 }; |
1103 | 1105 |
1104 } // namespace net | 1106 } // namespace net |
1105 | 1107 |
1106 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1108 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |