| 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 <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 static const QuicVersion kSupportedQuicVersions[] = { | 383 static const QuicVersion kSupportedQuicVersions[] = { |
| 384 QUIC_VERSION_34, QUIC_VERSION_33, QUIC_VERSION_32, QUIC_VERSION_31, | 384 QUIC_VERSION_34, QUIC_VERSION_33, QUIC_VERSION_32, QUIC_VERSION_31, |
| 385 QUIC_VERSION_30, QUIC_VERSION_29, QUIC_VERSION_28, QUIC_VERSION_27, | 385 QUIC_VERSION_30, QUIC_VERSION_29, QUIC_VERSION_28, QUIC_VERSION_27, |
| 386 QUIC_VERSION_26, QUIC_VERSION_25}; | 386 QUIC_VERSION_26, QUIC_VERSION_25}; |
| 387 | 387 |
| 388 typedef std::vector<QuicVersion> QuicVersionVector; | 388 typedef std::vector<QuicVersion> QuicVersionVector; |
| 389 | 389 |
| 390 // Returns a vector of QUIC versions in kSupportedQuicVersions. | 390 // Returns a vector of QUIC versions in kSupportedQuicVersions. |
| 391 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); | 391 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); |
| 392 | 392 |
| 393 // Returns a vector of QUIC versions from |versions| which exclude any versions |
| 394 // which are disabled by flags. |
| 395 NET_EXPORT_PRIVATE QuicVersionVector |
| 396 FilterSupportedVersions(QuicVersionVector versions); |
| 397 |
| 393 // QuicTag is written to and read from the wire, but we prefer to use | 398 // QuicTag is written to and read from the wire, but we prefer to use |
| 394 // the more readable QuicVersion at other levels. | 399 // the more readable QuicVersion at other levels. |
| 395 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 | 400 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 |
| 396 // if QuicVersion is unsupported. | 401 // if QuicVersion is unsupported. |
| 397 NET_EXPORT_PRIVATE QuicTag QuicVersionToQuicTag(const QuicVersion version); | 402 NET_EXPORT_PRIVATE QuicTag QuicVersionToQuicTag(const QuicVersion version); |
| 398 | 403 |
| 399 // Returns appropriate QuicVersion from a QuicTag. | 404 // Returns appropriate QuicVersion from a QuicTag. |
| 400 // Returns QUIC_VERSION_UNSUPPORTED if version_tag cannot be understood. | 405 // Returns QUIC_VERSION_UNSUPPORTED if version_tag cannot be understood. |
| 401 NET_EXPORT_PRIVATE QuicVersion QuicTagToQuicVersion(const QuicTag version_tag); | 406 NET_EXPORT_PRIVATE QuicVersion QuicTagToQuicVersion(const QuicTag version_tag); |
| 402 | 407 |
| (...skipping 1073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1476 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1481 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
| 1477 | 1482 |
| 1478 const struct iovec* iov; | 1483 const struct iovec* iov; |
| 1479 const int iov_count; | 1484 const int iov_count; |
| 1480 const size_t total_length; | 1485 const size_t total_length; |
| 1481 }; | 1486 }; |
| 1482 | 1487 |
| 1483 } // namespace net | 1488 } // namespace net |
| 1484 | 1489 |
| 1485 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1490 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |