| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 // The available versions of QUIC. Guaranteed that the integer value of the enum | 303 // The available versions of QUIC. Guaranteed that the integer value of the enum |
| 304 // will match the version number. | 304 // will match the version number. |
| 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_19 = 19, // Connection level flow control. | |
| 314 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. | 313 QUIC_VERSION_21 = 21, // Headers/crypto streams are flow controlled. |
| 315 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. | 314 QUIC_VERSION_22 = 22, // Send Server Config Update messages on crypto stream. |
| 316 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. | 315 QUIC_VERSION_23 = 23, // Timestamp in the ack frame. |
| 317 }; | 316 }; |
| 318 | 317 |
| 319 // This vector contains QUIC versions which we currently support. | 318 // This vector contains QUIC versions which we currently support. |
| 320 // 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 |
| 321 // element, with subsequent elements in descending order (versions can be | 320 // element, with subsequent elements in descending order (versions can be |
| 322 // skipped as necessary). | 321 // skipped as necessary). |
| 323 // | 322 // |
| 324 // 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 |
| 325 // http://sites/quic/adding-and-removing-versions | 324 // http://sites/quic/adding-and-removing-versions |
| 326 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, | 325 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, |
| 327 QUIC_VERSION_22, | 326 QUIC_VERSION_22}; |
| 328 QUIC_VERSION_19}; | |
| 329 | 327 |
| 330 typedef std::vector<QuicVersion> QuicVersionVector; | 328 typedef std::vector<QuicVersion> QuicVersionVector; |
| 331 | 329 |
| 332 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 330 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 333 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 331 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 334 | 332 |
| 335 // QuicTag is written to and read from the wire, but we prefer to use | 333 // QuicTag is written to and read from the wire, but we prefer to use |
| 336 // the more readable QuicVersion at other levels. | 334 // the more readable QuicVersion at other levels. |
| 337 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 335 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
| 338 // if QuicVersion is unsupported. | 336 // if QuicVersion is unsupported. |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 bool in_flight; | 1097 bool in_flight; |
| 1100 // True if the packet can never be acked, so it can be removed. | 1098 // True if the packet can never be acked, so it can be removed. |
| 1101 bool is_unackable; | 1099 bool is_unackable; |
| 1102 // True if the packet is an FEC packet. | 1100 // True if the packet is an FEC packet. |
| 1103 bool is_fec_packet; | 1101 bool is_fec_packet; |
| 1104 }; | 1102 }; |
| 1105 | 1103 |
| 1106 } // namespace net | 1104 } // namespace net |
| 1107 | 1105 |
| 1108 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1106 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |