| 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 <map> | 10 #include <map> |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 // When adding a new version to this enum you should add it to | 273 // When adding a new version to this enum you should add it to |
| 274 // kSupportedQuicVersions (if appropriate), and also add a new case to the | 274 // kSupportedQuicVersions (if appropriate), and also add a new case to the |
| 275 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and | 275 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and |
| 276 // QuicVersionToString. | 276 // QuicVersionToString. |
| 277 enum QuicVersion { | 277 enum QuicVersion { |
| 278 // Special case to indicate unknown/unsupported QUIC version. | 278 // Special case to indicate unknown/unsupported QUIC version. |
| 279 QUIC_VERSION_UNSUPPORTED = 0, | 279 QUIC_VERSION_UNSUPPORTED = 0, |
| 280 | 280 |
| 281 QUIC_VERSION_15 = 15, | 281 QUIC_VERSION_15 = 15, |
| 282 QUIC_VERSION_16 = 16, | 282 QUIC_VERSION_16 = 16, |
| 283 QUIC_VERSION_17 = 17, | |
| 284 QUIC_VERSION_18 = 18, | 283 QUIC_VERSION_18 = 18, |
| 285 QUIC_VERSION_19 = 19, | 284 QUIC_VERSION_19 = 19, |
| 286 QUIC_VERSION_20 = 20, // Current version. | 285 QUIC_VERSION_20 = 20, // Current version. |
| 287 }; | 286 }; |
| 288 | 287 |
| 289 // This vector contains QUIC versions which we currently support. | 288 // This vector contains QUIC versions which we currently support. |
| 290 // This should be ordered such that the highest supported version is the first | 289 // This should be ordered such that the highest supported version is the first |
| 291 // element, with subsequent elements in descending order (versions can be | 290 // element, with subsequent elements in descending order (versions can be |
| 292 // skipped as necessary). | 291 // skipped as necessary). |
| 293 // | 292 // |
| 294 // IMPORTANT: if you are addding to this list, follow the instructions at | 293 // IMPORTANT: if you are addding to this list, follow the instructions at |
| 295 // http://sites/quic/adding-and-removing-versions | 294 // http://sites/quic/adding-and-removing-versions |
| 296 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_20, | 295 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_20, |
| 297 QUIC_VERSION_19, | 296 QUIC_VERSION_19, |
| 298 QUIC_VERSION_18, | 297 QUIC_VERSION_18, |
| 299 QUIC_VERSION_17, | |
| 300 QUIC_VERSION_16, | 298 QUIC_VERSION_16, |
| 301 QUIC_VERSION_15}; | 299 QUIC_VERSION_15}; |
| 302 | 300 |
| 303 typedef std::vector<QuicVersion> QuicVersionVector; | 301 typedef std::vector<QuicVersion> QuicVersionVector; |
| 304 | 302 |
| 305 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 303 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 306 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 304 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 307 | 305 |
| 308 // QuicTag is written to and read from the wire, but we prefer to use | 306 // QuicTag is written to and read from the wire, but we prefer to use |
| 309 // the more readable QuicVersion at other levels. | 307 // the more readable QuicVersion at other levels. |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1066 // Stores the sequence numbers of all transmissions of this packet. | 1064 // Stores the sequence numbers of all transmissions of this packet. |
| 1067 // Can never be null. | 1065 // Can never be null. |
| 1068 SequenceNumberSet* all_transmissions; | 1066 SequenceNumberSet* all_transmissions; |
| 1069 // In flight packets have not been abandoned or lost. | 1067 // In flight packets have not been abandoned or lost. |
| 1070 bool in_flight; | 1068 bool in_flight; |
| 1071 }; | 1069 }; |
| 1072 | 1070 |
| 1073 } // namespace net | 1071 } // namespace net |
| 1074 | 1072 |
| 1075 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1073 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |