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

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

Issue 990533002: Land Recent QUIC Changes until 03/06/2015. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_session.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 // Default and initial maximum size in bytes of a QUIC packet. 51 // Default and initial maximum size in bytes of a QUIC packet.
52 const QuicByteCount kDefaultMaxPacketSize = 1350; 52 const QuicByteCount kDefaultMaxPacketSize = 1350;
53 // Default initial maximum size in bytes of a QUIC packet for servers. 53 // Default initial maximum size in bytes of a QUIC packet for servers.
54 const QuicByteCount kDefaultServerMaxPacketSize = 1000; 54 const QuicByteCount kDefaultServerMaxPacketSize = 1000;
55 // The maximum packet size of any QUIC packet, based on ethernet's max size, 55 // The maximum packet size of any QUIC packet, based on ethernet's max size,
56 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an 56 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an
57 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's 57 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's
58 // max packet size is 1500 bytes, 1500 - 48 = 1452. 58 // max packet size is 1500 bytes, 1500 - 48 = 1452.
59 const QuicByteCount kMaxPacketSize = 1452; 59 const QuicByteCount kMaxPacketSize = 1452;
60 // Default maximum packet size used in Linux TCP implementations. 60 // Default maximum packet size used in the Linux TCP implementation.
61 // Used in QUIC for congestion window computations in bytes.
61 const QuicByteCount kDefaultTCPMSS = 1460; 62 const QuicByteCount kDefaultTCPMSS = 1460;
62 63
63 // We match SPDY's use of 32 when secure (since we'd compete with SPDY). 64 // We match SPDY's use of 32 when secure (since we'd compete with SPDY).
64 const QuicPacketCount kInitialCongestionWindowSecure = 32; 65 const QuicPacketCount kInitialCongestionWindowSecure = 32;
65 // Be conservative, and just use double a typical TCP ICWND for HTTP. 66 // Be conservative, and just use double a typical TCP ICWND for HTTP.
66 const QuicPacketCount kInitialCongestionWindowInsecure = 20; 67 const QuicPacketCount kInitialCongestionWindowInsecure = 20;
67 68
68 // Minimum size of initial flow control window, for both stream and session. 69 // Minimum size of initial flow control window, for both stream and session.
69 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB 70 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB
70 71
(...skipping 514 matching lines...) Expand 10 before | Expand all | Expand 10 after
585 // Universal header. All QuicPacket headers will have a connection_id and 586 // Universal header. All QuicPacket headers will have a connection_id and
586 // public flags. 587 // public flags.
587 QuicConnectionId connection_id; 588 QuicConnectionId connection_id;
588 QuicConnectionIdLength connection_id_length; 589 QuicConnectionIdLength connection_id_length;
589 bool reset_flag; 590 bool reset_flag;
590 bool version_flag; 591 bool version_flag;
591 QuicSequenceNumberLength sequence_number_length; 592 QuicSequenceNumberLength sequence_number_length;
592 QuicVersionVector versions; 593 QuicVersionVector versions;
593 }; 594 };
594 595
596 // An integer which cannot be a packet sequence number.
597 const QuicPacketSequenceNumber kInvalidPacketSequenceNumber = 0;
598
595 // Header for Data or FEC packets. 599 // Header for Data or FEC packets.
596 struct NET_EXPORT_PRIVATE QuicPacketHeader { 600 struct NET_EXPORT_PRIVATE QuicPacketHeader {
597 QuicPacketHeader(); 601 QuicPacketHeader();
598 explicit QuicPacketHeader(const QuicPacketPublicHeader& header); 602 explicit QuicPacketHeader(const QuicPacketPublicHeader& header);
599 603
600 NET_EXPORT_PRIVATE friend std::ostream& operator<<( 604 NET_EXPORT_PRIVATE friend std::ostream& operator<<(
601 std::ostream& os, const QuicPacketHeader& s); 605 std::ostream& os, const QuicPacketHeader& s);
602 606
603 QuicPacketPublicHeader public_header; 607 QuicPacketPublicHeader public_header;
604 bool fec_flag; 608 bool fec_flag;
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 bool in_flight; 1040 bool in_flight;
1037 // True if the packet can never be acked, so it can be removed. 1041 // True if the packet can never be acked, so it can be removed.
1038 bool is_unackable; 1042 bool is_unackable;
1039 // True if the packet is an FEC packet. 1043 // True if the packet is an FEC packet.
1040 bool is_fec_packet; 1044 bool is_fec_packet;
1041 }; 1045 };
1042 1046
1043 } // namespace net 1047 } // namespace net
1044 1048
1045 #endif // NET_QUIC_QUIC_PROTOCOL_H_ 1049 #endif // NET_QUIC_QUIC_PROTOCOL_H_
OLDNEW
« no previous file with comments | « net/quic/quic_packet_creator_test.cc ('k') | net/quic/quic_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698