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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 const QuicByteCount kDefaultTCPMSS = 1460; | 61 const QuicByteCount kDefaultTCPMSS = 1460; |
62 | 62 |
63 // We match SPDY's use of 32 when secure (since we'd compete with SPDY). | 63 // We match SPDY's use of 32 when secure (since we'd compete with SPDY). |
64 const QuicPacketCount kInitialCongestionWindowSecure = 32; | 64 const QuicPacketCount kInitialCongestionWindowSecure = 32; |
65 // Be conservative, and just use double a typical TCP ICWND for HTTP. | 65 // Be conservative, and just use double a typical TCP ICWND for HTTP. |
66 const QuicPacketCount kInitialCongestionWindowInsecure = 20; | 66 const QuicPacketCount kInitialCongestionWindowInsecure = 20; |
67 | 67 |
68 // Minimum size of initial flow control window, for both stream and session. | 68 // Minimum size of initial flow control window, for both stream and session. |
69 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB | 69 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB |
70 | 70 |
71 // Minimum size of the CWND, in packets, when doing bandwidth resumption. | 71 // Minimum and maximum size of the CWND, in packets, |
| 72 // when doing bandwidth resumption. |
72 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; | 73 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; |
| 74 const QuicPacketCount kMaxCongestionWindowForBandwidthResumption = 200; |
73 | 75 |
74 // Maximum size of the CWND, in packets, for TCP congestion control algorithms. | 76 // Maximum number of tracked packets before the connection will be closed. |
75 const QuicPacketCount kMaxTcpCongestionWindow = 200; | 77 // This effectively limits the max CWND to a smaller value than this. |
| 78 const QuicPacketCount kMaxTrackedPackets = 5000; |
76 | 79 |
77 // Default size of the socket receive buffer in bytes. | 80 // Default size of the socket receive buffer in bytes. |
78 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; | 81 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; |
79 // Minimum size of the socket receive buffer in bytes. | 82 // Minimum size of the socket receive buffer in bytes. |
80 // Smaller values are ignored. | 83 // Smaller values are ignored. |
81 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024; | 84 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024; |
82 | 85 |
83 // Don't allow a client to suggest an RTT shorter than 10ms. | 86 // Don't allow a client to suggest an RTT shorter than 10ms. |
84 const uint32 kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; | 87 const uint32 kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; |
85 | 88 |
(...skipping 13 matching lines...) Expand all Loading... |
99 const size_t kFecGroupSize = 1; | 102 const size_t kFecGroupSize = 1; |
100 | 103 |
101 // Signifies that the QuicPacket will contain version of the protocol. | 104 // Signifies that the QuicPacket will contain version of the protocol. |
102 const bool kIncludeVersion = true; | 105 const bool kIncludeVersion = true; |
103 | 106 |
104 // Index of the first byte in a QUIC packet which is used in hash calculation. | 107 // Index of the first byte in a QUIC packet which is used in hash calculation. |
105 const size_t kStartOfHashData = 0; | 108 const size_t kStartOfHashData = 0; |
106 | 109 |
107 // Limit on the delta between stream IDs. | 110 // Limit on the delta between stream IDs. |
108 const QuicStreamId kMaxStreamIdDelta = 200; | 111 const QuicStreamId kMaxStreamIdDelta = 200; |
109 // Limit on the delta between header IDs. | |
110 const QuicHeaderId kMaxHeaderIdDelta = 200; | |
111 | 112 |
112 // Reserved ID for the crypto stream. | 113 // Reserved ID for the crypto stream. |
113 const QuicStreamId kCryptoStreamId = 1; | 114 const QuicStreamId kCryptoStreamId = 1; |
114 | 115 |
115 // Reserved ID for the headers stream. | 116 // Reserved ID for the headers stream. |
116 const QuicStreamId kHeadersStreamId = 3; | 117 const QuicStreamId kHeadersStreamId = 3; |
117 | 118 |
118 // Maximum delayed ack time, in ms. | 119 // Maximum delayed ack time, in ms. |
119 const int64 kMaxDelayedAckTimeMs = 25; | 120 const int64 kMaxDelayedAckTimeMs = 25; |
120 | 121 |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1035 bool in_flight; | 1036 bool in_flight; |
1036 // True if the packet can never be acked, so it can be removed. | 1037 // True if the packet can never be acked, so it can be removed. |
1037 bool is_unackable; | 1038 bool is_unackable; |
1038 // True if the packet is an FEC packet. | 1039 // True if the packet is an FEC packet. |
1039 bool is_fec_packet; | 1040 bool is_fec_packet; |
1040 }; | 1041 }; |
1041 | 1042 |
1042 } // namespace net | 1043 } // namespace net |
1043 | 1044 |
1044 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1045 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |