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 <list> | 10 #include <list> |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 const QuicByteCount kDefaultTCPMSS = 1460; | 62 const QuicByteCount kDefaultTCPMSS = 1460; |
63 | 63 |
64 // 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). |
65 const QuicPacketCount kInitialCongestionWindowSecure = 32; | 65 const QuicPacketCount kInitialCongestionWindowSecure = 32; |
66 // 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. |
67 const QuicPacketCount kInitialCongestionWindowInsecure = 20; | 67 const QuicPacketCount kInitialCongestionWindowInsecure = 20; |
68 | 68 |
69 // 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. |
70 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB | 70 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB |
71 | 71 |
72 // Minimum and maximum size of the CWND, in packets, | 72 // Minimum size of the CWND, in packets, when doing bandwidth resumption. |
73 // when doing bandwidth resumption. | |
74 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; | 73 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; |
75 const QuicPacketCount kMaxCongestionWindowForBandwidthResumption = 200; | |
76 | 74 |
77 // Maximum number of tracked packets before the connection will be closed. | 75 // Maximum size of the CWND, in packets, for TCP congestion control algorithms. |
78 // This effectively limits the max CWND to a smaller value than this. | 76 const QuicPacketCount kMaxTcpCongestionWindow = 200; |
79 const QuicPacketCount kMaxTrackedPackets = 5000; | |
80 | 77 |
81 // Default size of the socket receive buffer in bytes. | 78 // Default size of the socket receive buffer in bytes. |
82 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; | 79 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; |
83 // Minimum size of the socket receive buffer in bytes. | 80 // Minimum size of the socket receive buffer in bytes. |
84 // Smaller values are ignored. | 81 // Smaller values are ignored. |
85 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024; | 82 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024; |
86 | 83 |
87 // Don't allow a client to suggest an RTT shorter than 10ms. | 84 // Don't allow a client to suggest an RTT shorter than 10ms. |
88 const uint32 kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; | 85 const uint32 kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; |
89 | 86 |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
748 QuicAckFrame* ack_frame, | 745 QuicAckFrame* ack_frame, |
749 QuicPacketSequenceNumber lower, | 746 QuicPacketSequenceNumber lower, |
750 QuicPacketSequenceNumber higher); | 747 QuicPacketSequenceNumber higher); |
751 | 748 |
752 // Defines for all types of congestion control algorithms that can be used in | 749 // Defines for all types of congestion control algorithms that can be used in |
753 // QUIC. Note that this is separate from the congestion feedback type - | 750 // QUIC. Note that this is separate from the congestion feedback type - |
754 // some congestion control algorithms may use the same feedback type | 751 // some congestion control algorithms may use the same feedback type |
755 // (Reno and Cubic are the classic example for that). | 752 // (Reno and Cubic are the classic example for that). |
756 enum CongestionControlType { | 753 enum CongestionControlType { |
757 kCubic, | 754 kCubic, |
| 755 kCubicBytes, |
758 kReno, | 756 kReno, |
| 757 kRenoBytes, |
759 kBBR, | 758 kBBR, |
760 }; | 759 }; |
761 | 760 |
762 enum LossDetectionType { | 761 enum LossDetectionType { |
763 kNack, // Used to mimic TCP's loss detection. | 762 kNack, // Used to mimic TCP's loss detection. |
764 kTime, // Time based loss detection. | 763 kTime, // Time based loss detection. |
765 }; | 764 }; |
766 | 765 |
767 struct NET_EXPORT_PRIVATE QuicRstStreamFrame { | 766 struct NET_EXPORT_PRIVATE QuicRstStreamFrame { |
768 QuicRstStreamFrame(); | 767 QuicRstStreamFrame(); |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1048 bool in_flight; | 1047 bool in_flight; |
1049 // True if the packet can never be acked, so it can be removed. | 1048 // True if the packet can never be acked, so it can be removed. |
1050 bool is_unackable; | 1049 bool is_unackable; |
1051 // True if the packet is an FEC packet. | 1050 // True if the packet is an FEC packet. |
1052 bool is_fec_packet; | 1051 bool is_fec_packet; |
1053 }; | 1052 }; |
1054 | 1053 |
1055 } // namespace net | 1054 } // namespace net |
1056 | 1055 |
1057 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1056 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |