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

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

Issue 691483003: Land Recent QUIC Changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Final_1028
Patch Set: Compilation error fixes Created 6 years, 1 month 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
« no previous file with comments | « net/quic/quic_packet_generator_test.cc ('k') | net/quic/quic_received_packet_manager.h » ('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 <list> 10 #include <list>
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const size_t kDefaultInitialWindow = 10; 63 const size_t kDefaultInitialWindow = 10;
64 const uint32 kMaxInitialWindow = 100; 64 const uint32 kMaxInitialWindow = 100;
65 65
66 // Default size of initial flow control window, for both stream and session. 66 // Default size of initial flow control window, for both stream and session.
67 const uint32 kDefaultFlowControlSendWindow = 16 * 1024; // 16 KB 67 const uint32 kDefaultFlowControlSendWindow = 16 * 1024; // 16 KB
68 68
69 // Maximum size of the congestion window, in packets, for TCP congestion control 69 // Maximum size of the congestion window, in packets, for TCP congestion control
70 // algorithms. 70 // algorithms.
71 const size_t kMaxTcpCongestionWindow = 200; 71 const size_t kMaxTcpCongestionWindow = 200;
72 72
73 // Size of the socket receive buffer in bytes. 73 // Default size of the socket receive buffer in bytes.
74 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; 74 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024;
75 // Minimum size of the socket receive buffer in bytes.
76 // Smaller values are ignored.
77 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024;
75 78
76 // Don't allow a client to suggest an RTT longer than 15 seconds. 79 // Don't allow a client to suggest an RTT longer than 15 seconds.
77 const uint32 kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; 80 const uint32 kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond;
78 81
79 // Maximum number of open streams per connection. 82 // Maximum number of open streams per connection.
80 const size_t kDefaultMaxStreamsPerConnection = 100; 83 const size_t kDefaultMaxStreamsPerConnection = 100;
81 84
82 // Number of bytes reserved for public flags in the packet header. 85 // Number of bytes reserved for public flags in the packet header.
83 const size_t kPublicFlagsSize = 1; 86 const size_t kPublicFlagsSize = 1;
84 // Number of bytes reserved for version number in the packet header. 87 // Number of bytes reserved for version number in the packet header.
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 309
307 // This vector contains QUIC versions which we currently support. 310 // This vector contains QUIC versions which we currently support.
308 // This should be ordered such that the highest supported version is the first 311 // This should be ordered such that the highest supported version is the first
309 // element, with subsequent elements in descending order (versions can be 312 // element, with subsequent elements in descending order (versions can be
310 // skipped as necessary). 313 // skipped as necessary).
311 // 314 //
312 // IMPORTANT: if you are adding to this list, follow the instructions at 315 // IMPORTANT: if you are adding to this list, follow the instructions at
313 // http://sites/quic/adding-and-removing-versions 316 // http://sites/quic/adding-and-removing-versions
314 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23, 317 static const QuicVersion kSupportedQuicVersions[] = {QUIC_VERSION_23,
315 QUIC_VERSION_22, 318 QUIC_VERSION_22,
316 QUIC_VERSION_21,
317 QUIC_VERSION_19}; 319 QUIC_VERSION_19};
318 320
319 typedef std::vector<QuicVersion> QuicVersionVector; 321 typedef std::vector<QuicVersion> QuicVersionVector;
320 322
321 // Returns a vector of QUIC versions in kSupportedQuicVersions. 323 // Returns a vector of QUIC versions in kSupportedQuicVersions.
322 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions(); 324 NET_EXPORT_PRIVATE QuicVersionVector QuicSupportedVersions();
323 325
324 // QuicTag is written to and read from the wire, but we prefer to use 326 // QuicTag is written to and read from the wire, but we prefer to use
325 // the more readable QuicVersion at other levels. 327 // the more readable QuicVersion at other levels.
326 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0 328 // Helper function which translates from a QuicVersion to a QuicTag. Returns 0
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 // We received invalid data on the headers stream. 495 // We received invalid data on the headers stream.
494 QUIC_INVALID_HEADERS_STREAM_DATA = 56, 496 QUIC_INVALID_HEADERS_STREAM_DATA = 56,
495 // The peer received too much data, violating flow control. 497 // The peer received too much data, violating flow control.
496 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA = 59, 498 QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA = 59,
497 // The peer sent too much data, violating flow control. 499 // The peer sent too much data, violating flow control.
498 QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA = 63, 500 QUIC_FLOW_CONTROL_SENT_TOO_MUCH_DATA = 63,
499 // The peer received an invalid flow control window. 501 // The peer received an invalid flow control window.
500 QUIC_FLOW_CONTROL_INVALID_WINDOW = 64, 502 QUIC_FLOW_CONTROL_INVALID_WINDOW = 64,
501 // The connection has been IP pooled into an existing connection. 503 // The connection has been IP pooled into an existing connection.
502 QUIC_CONNECTION_IP_POOLED = 62, 504 QUIC_CONNECTION_IP_POOLED = 62,
505 // The connection has too many outstanding sent packets.
506 QUIC_TOO_MANY_OUTSTANDING_SENT_PACKETS = 68,
507 // The connection has too many outstanding received packets.
508 QUIC_TOO_MANY_OUTSTANDING_RECEIVED_PACKETS = 69,
503 509
504 // Crypto errors. 510 // Crypto errors.
505 511
506 // Hanshake failed. 512 // Hanshake failed.
507 QUIC_HANDSHAKE_FAILED = 28, 513 QUIC_HANDSHAKE_FAILED = 28,
508 // Handshake message contained out of order tags. 514 // Handshake message contained out of order tags.
509 QUIC_CRYPTO_TAGS_OUT_OF_ORDER = 29, 515 QUIC_CRYPTO_TAGS_OUT_OF_ORDER = 29,
510 // Handshake message contained too many entries. 516 // Handshake message contained too many entries.
511 QUIC_CRYPTO_TOO_MANY_ENTRIES = 30, 517 QUIC_CRYPTO_TOO_MANY_ENTRIES = 30,
512 // Handshake message contained an invalid value length. 518 // Handshake message contained an invalid value length.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // A handshake message arrived, but we are still validating the 556 // A handshake message arrived, but we are still validating the
551 // previous handshake message. 557 // previous handshake message.
552 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54, 558 QUIC_CRYPTO_MESSAGE_WHILE_VALIDATING_CLIENT_HELLO = 54,
553 // A server config update arrived before the handshake is complete. 559 // A server config update arrived before the handshake is complete.
554 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65, 560 QUIC_CRYPTO_UPDATE_BEFORE_HANDSHAKE_COMPLETE = 65,
555 // This connection involved a version negotiation which appears to have been 561 // This connection involved a version negotiation which appears to have been
556 // tampered with. 562 // tampered with.
557 QUIC_VERSION_NEGOTIATION_MISMATCH = 55, 563 QUIC_VERSION_NEGOTIATION_MISMATCH = 55,
558 564
559 // No error. Used as bound while iterating. 565 // No error. Used as bound while iterating.
560 QUIC_LAST_ERROR = 68, 566 QUIC_LAST_ERROR = 70,
561 }; 567 };
562 568
563 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader { 569 struct NET_EXPORT_PRIVATE QuicPacketPublicHeader {
564 QuicPacketPublicHeader(); 570 QuicPacketPublicHeader();
565 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other); 571 explicit QuicPacketPublicHeader(const QuicPacketPublicHeader& other);
566 ~QuicPacketPublicHeader(); 572 ~QuicPacketPublicHeader();
567 573
568 // Universal header. All QuicPacket headers will have a connection_id and 574 // Universal header. All QuicPacket headers will have a connection_id and
569 // public flags. 575 // public flags.
570 QuicConnectionId connection_id; 576 QuicConnectionId connection_id;
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 SequenceNumberList* all_transmissions; 1087 SequenceNumberList* all_transmissions;
1082 // In flight packets have not been abandoned or lost. 1088 // In flight packets have not been abandoned or lost.
1083 bool in_flight; 1089 bool in_flight;
1084 // True if the packet can never be acked, so it can be removed. 1090 // True if the packet can never be acked, so it can be removed.
1085 bool is_unackable; 1091 bool is_unackable;
1086 }; 1092 };
1087 1093
1088 } // namespace net 1094 } // namespace net
1089 1095
1090 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1096 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_generator_test.cc ('k') | net/quic/quic_received_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698