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_CORE_QUIC_VERSIONS_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_VERSIONS_H_ |
6 #define NET_QUIC_CORE_QUIC_VERSIONS_H_ | 6 #define NET_QUIC_CORE_QUIC_VERSIONS_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 // QuicVersionToString. | 22 // QuicVersionToString. |
23 enum QuicVersion { | 23 enum QuicVersion { |
24 // Special case to indicate unknown/unsupported QUIC version. | 24 // Special case to indicate unknown/unsupported QUIC version. |
25 QUIC_VERSION_UNSUPPORTED = 0, | 25 QUIC_VERSION_UNSUPPORTED = 0, |
26 | 26 |
27 QUIC_VERSION_34 = 34, // Deprecates entropy, removes private flag from packet | 27 QUIC_VERSION_34 = 34, // Deprecates entropy, removes private flag from packet |
28 // header, uses new ack and stop waiting wire format. | 28 // header, uses new ack and stop waiting wire format. |
29 QUIC_VERSION_35 = 35, // Allows endpoints to independently set stream limit. | 29 QUIC_VERSION_35 = 35, // Allows endpoints to independently set stream limit. |
30 QUIC_VERSION_36 = 36, // Add support to force HOL blocking. | 30 QUIC_VERSION_36 = 36, // Add support to force HOL blocking. |
31 QUIC_VERSION_37 = 37, // Add perspective into null encryption. | 31 QUIC_VERSION_37 = 37, // Add perspective into null encryption. |
32 QUIC_VERSION_38 = 38, // Experimental support for HTTP stream pairs | 32 QUIC_VERSION_38 = 38, // PADDING frame is a 1-byte frame with type 0x00. |
| 33 // Respect NSTP connection option. |
| 34 QUIC_VERSION_39 = 39, // Experimental support for HTTP stream pairs |
33 // and HPACK HoL avoidance. | 35 // and HPACK HoL avoidance. |
34 | 36 |
35 // IMPORTANT: if you are adding to this list, follow the instructions at | 37 // IMPORTANT: if you are adding to this list, follow the instructions at |
36 // http://sites/quic/adding-and-removing-versions | 38 // http://sites/quic/adding-and-removing-versions |
37 }; | 39 }; |
38 | 40 |
39 // This vector contains QUIC versions which we currently support. | 41 // This vector contains QUIC versions which we currently support. |
40 // This should be ordered such that the highest supported version is the first | 42 // This should be ordered such that the highest supported version is the first |
41 // element, with subsequent elements in descending order (versions can be | 43 // element, with subsequent elements in descending order (versions can be |
42 // skipped as necessary). | 44 // skipped as necessary). |
43 // | 45 // |
44 // IMPORTANT: if you are adding to this list, follow the instructions at | 46 // IMPORTANT: if you are adding to this list, follow the instructions at |
45 // http://sites/quic/adding-and-removing-versions | 47 // http://sites/quic/adding-and-removing-versions |
46 static const QuicVersion kSupportedQuicVersions[] = { | 48 static const QuicVersion kSupportedQuicVersions[] = { |
47 QUIC_VERSION_38, QUIC_VERSION_37, QUIC_VERSION_36, QUIC_VERSION_35, | 49 QUIC_VERSION_39, QUIC_VERSION_38, QUIC_VERSION_37, |
48 QUIC_VERSION_34}; | 50 QUIC_VERSION_36, QUIC_VERSION_35, QUIC_VERSION_34}; |
49 | 51 |
50 typedef std::vector<QuicVersion> QuicVersionVector; | 52 typedef std::vector<QuicVersion> QuicVersionVector; |
51 | 53 |
52 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 54 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
53 QUIC_EXPORT_PRIVATE QuicVersionVector AllSupportedVersions(); | 55 QUIC_EXPORT_PRIVATE QuicVersionVector AllSupportedVersions(); |
54 | 56 |
55 // Returns a vector of QUIC versions from kSupportedQuicVersions which exclude | 57 // Returns a vector of QUIC versions from kSupportedQuicVersions which exclude |
56 // any versions which are disabled by flags. | 58 // any versions which are disabled by flags. |
57 QUIC_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions(); | 59 QUIC_EXPORT_PRIVATE QuicVersionVector CurrentSupportedVersions(); |
58 | 60 |
(...skipping 22 matching lines...) Expand all Loading... |
81 QUIC_EXPORT_PRIVATE std::string QuicVersionToString(const QuicVersion version); | 83 QUIC_EXPORT_PRIVATE std::string QuicVersionToString(const QuicVersion version); |
82 | 84 |
83 // Returns comma separated list of string representations of QuicVersion enum | 85 // Returns comma separated list of string representations of QuicVersion enum |
84 // values in the supplied |versions| vector. | 86 // values in the supplied |versions| vector. |
85 QUIC_EXPORT_PRIVATE std::string QuicVersionVectorToString( | 87 QUIC_EXPORT_PRIVATE std::string QuicVersionVectorToString( |
86 const QuicVersionVector& versions); | 88 const QuicVersionVector& versions); |
87 | 89 |
88 } // namespace net | 90 } // namespace net |
89 | 91 |
90 #endif // NET_QUIC_CORE_QUIC_VERSIONS_H_ | 92 #endif // NET_QUIC_CORE_QUIC_VERSIONS_H_ |
OLD | NEW |