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 <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 // We match SPDY's use of 32 (since we'd compete with SPDY). | 68 // We match SPDY's use of 32 (since we'd compete with SPDY). |
69 const QuicPacketCount kInitialCongestionWindow = 32; | 69 const QuicPacketCount kInitialCongestionWindow = 32; |
70 | 70 |
71 // Minimum size of initial flow control window, for both stream and session. | 71 // Minimum size of initial flow control window, for both stream and session. |
72 const uint32_t kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB | 72 const uint32_t kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB |
73 | 73 |
74 // Maximum flow control receive window limits for connection and stream. | 74 // Maximum flow control receive window limits for connection and stream. |
75 const QuicByteCount kStreamReceiveWindowLimit = 16 * 1024 * 1024; // 16 MB | 75 const QuicByteCount kStreamReceiveWindowLimit = 16 * 1024 * 1024; // 16 MB |
76 const QuicByteCount kSessionReceiveWindowLimit = 24 * 1024 * 1024; // 24 MB | 76 const QuicByteCount kSessionReceiveWindowLimit = 24 * 1024 * 1024; // 24 MB |
77 | 77 |
78 // Minimum size of the CWND, in packets, when doing bandwidth resumption. | |
79 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; | |
80 | |
81 // Maximum number of tracked packets. | 78 // Maximum number of tracked packets. |
82 const QuicPacketCount kMaxTrackedPackets = 10000; | 79 const QuicPacketCount kMaxTrackedPackets = 10000; |
83 | 80 |
84 // Default size of the socket receive buffer in bytes. | 81 // Default size of the socket receive buffer in bytes. |
85 const QuicByteCount kDefaultSocketReceiveBuffer = 1024 * 1024; | 82 const QuicByteCount kDefaultSocketReceiveBuffer = 1024 * 1024; |
86 // Minimum size of the socket receive buffer in bytes. | |
87 // Smaller values are ignored. | |
88 const QuicByteCount kMinSocketReceiveBuffer = 16 * 1024; | |
89 | |
90 // Fraction of the receive buffer that can be used, based on conservative | |
91 // estimates and testing on Linux. | |
92 // An alternative to kUsableRecieveBufferFraction. | |
93 static const float kConservativeReceiveBufferFraction = 0.6f; | |
94 | 83 |
95 // 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. |
96 const uint32_t kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; | 85 const uint32_t kMinInitialRoundTripTimeUs = 10 * kNumMicrosPerMilli; |
97 | 86 |
98 // Don't allow a client to suggest an RTT longer than 15 seconds. | 87 // Don't allow a client to suggest an RTT longer than 15 seconds. |
99 const uint32_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; | 88 const uint32_t kMaxInitialRoundTripTimeUs = 15 * kNumMicrosPerSecond; |
100 | 89 |
101 // Maximum number of open streams per connection. | 90 // Maximum number of open streams per connection. |
102 const size_t kDefaultMaxStreamsPerConnection = 100; | 91 const size_t kDefaultMaxStreamsPerConnection = 100; |
103 | 92 |
(...skipping 1424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1517 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
1529 | 1518 |
1530 const struct iovec* iov; | 1519 const struct iovec* iov; |
1531 const int iov_count; | 1520 const int iov_count; |
1532 const size_t total_length; | 1521 const size_t total_length; |
1533 }; | 1522 }; |
1534 | 1523 |
1535 } // namespace net | 1524 } // namespace net |
1536 | 1525 |
1537 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1526 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |