| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 QUIC_VERSION_13 = 13, // Current version. | 245 QUIC_VERSION_13 = 13, // Current version. |
| 246 }; | 246 }; |
| 247 | 247 |
| 248 // This vector contains QUIC versions which we currently support. | 248 // This vector contains QUIC versions which we currently support. |
| 249 // This should be ordered such that the highest supported version is the first | 249 // This should be ordered such that the highest supported version is the first |
| 250 // element, with subsequent elements in descending order (versions can be | 250 // element, with subsequent elements in descending order (versions can be |
| 251 // skipped as necessary). | 251 // skipped as necessary). |
| 252 // | 252 // |
| 253 // IMPORTANT: if you are addding to this list, follow the instructions at | 253 // IMPORTANT: if you are addding to this list, follow the instructions at |
| 254 // http://sites/quic/adding-and-removing-versions | 254 // http://sites/quic/adding-and-removing-versions |
| 255 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_12}; | 255 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_13, |
| 256 QUIC_VERSION_12}; |
| 256 | 257 |
| 257 typedef std::vector<QuicVersion> QuicVersionVector; | 258 typedef std::vector<QuicVersion> QuicVersionVector; |
| 258 | 259 |
| 259 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 260 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 260 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 261 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 261 | 262 |
| 262 // QuicTag is written to and read from the wire, but we prefer to use | 263 // QuicTag is written to and read from the wire, but we prefer to use |
| 263 // the more readable QuicVersion at other levels. | 264 // the more readable QuicVersion at other levels. |
| 264 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 265 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
| 265 // if QuicVersion is unsupported. | 266 // if QuicVersion is unsupported. |
| (...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 953 WriteStatus status; | 954 WriteStatus status; |
| 954 union { | 955 union { |
| 955 int bytes_written; // only valid when status is OK | 956 int bytes_written; // only valid when status is OK |
| 956 int error_code; // only valid when status is ERROR | 957 int error_code; // only valid when status is ERROR |
| 957 }; | 958 }; |
| 958 }; | 959 }; |
| 959 | 960 |
| 960 } // namespace net | 961 } // namespace net |
| 961 | 962 |
| 962 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 963 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |