Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(791)

Side by Side Diff: net/quic/quic_protocol.h

Issue 198353003: Land Recent QUIC Changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // will match the version number. 247 // will match the version number.
248 // When adding a new version to this enum you should add it to 248 // When adding a new version to this enum you should add it to
249 // kSupportedQuicVersions (if appropriate), and also add a new case to the 249 // kSupportedQuicVersions (if appropriate), and also add a new case to the
250 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and 250 // helper methods QuicVersionToQuicTag, QuicTagToQuicVersion, and
251 // QuicVersionToString. 251 // QuicVersionToString.
252 enum QuicVersion { 252 enum QuicVersion {
253 // Special case to indicate unknown/unsupported QUIC version. 253 // Special case to indicate unknown/unsupported QUIC version.
254 QUIC_VERSION_UNSUPPORTED = 0, 254 QUIC_VERSION_UNSUPPORTED = 0,
255 255
256 QUIC_VERSION_13 = 13, 256 QUIC_VERSION_13 = 13,
257 QUIC_VERSION_14 = 14,
258 QUIC_VERSION_15 = 15, 257 QUIC_VERSION_15 = 15,
259 QUIC_VERSION_16 = 16, // Current version. 258 QUIC_VERSION_16 = 16, // Current version.
260 }; 259 };
261 260
262 // This vector contains QUIC versions which we currently support. 261 // This vector contains QUIC versions which we currently support.
263 // This should be ordered such that the highest supported version is the first 262 // This should be ordered such that the highest supported version is the first
264 // element, with subsequent elements in descending order (versions can be 263 // element, with subsequent elements in descending order (versions can be
265 // skipped as necessary). 264 // skipped as necessary).
266 // 265 //
267 // IMPORTANT: if you are addding to this list, follow the instructions at 266 // IMPORTANT: if you are addding to this list, follow the instructions at
268 // http://sites/quic/adding-and-removing-versions 267 // http://sites/quic/adding-and-removing-versions
269 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_16, 268 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_16,
270 QUIC_VERSION_15, 269 QUIC_VERSION_15,
271 QUIC_VERSION_14,
272 QUIC_VERSION_13}; 270 QUIC_VERSION_13};
273 271
274 typedef std::vector<QuicVersion> QuicVersionVector; 272 typedef std::vector<QuicVersion> QuicVersionVector;
275 273
276 // Returns a vector of QUIC versions in kSupportedQuicVersions. 274 // Returns a vector of QUIC versions in kSupportedQuicVersions.
277 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); 275 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions();
278 276
279 // QuicTag is written to and read from the wire, but we prefer to use 277 // QuicTag is written to and read from the wire, but we prefer to use
280 // the more readable QuicVersion at other levels. 278 // the more readable QuicVersion at other levels.
281 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 279 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0
(...skipping 729 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 WriteStatus status; 1009 WriteStatus status;
1012 union { 1010 union {
1013 int bytes_written; // only valid when status is OK 1011 int bytes_written; // only valid when status is OK
1014 int error_code; // only valid when status is ERROR 1012 int error_code; // only valid when status is ERROR
1015 }; 1013 };
1016 }; 1014 };
1017 1015
1018 } // namespace net 1016 } // namespace net
1019 1017
1020 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1018 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_generator.h ('k') | net/quic/quic_protocol.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698