| 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 #include <limits> | 10 #include <limits> |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 const QuicByteCount kDefaultServerMaxPacketSize = 1000; | 61 const QuicByteCount kDefaultServerMaxPacketSize = 1000; |
| 62 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 62 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
| 63 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an | 63 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an |
| 64 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 64 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
| 65 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 65 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
| 66 const QuicByteCount kMaxPacketSize = 1452; | 66 const QuicByteCount kMaxPacketSize = 1452; |
| 67 // Default maximum packet size used in the Linux TCP implementation. | 67 // Default maximum packet size used in the Linux TCP implementation. |
| 68 // Used in QUIC for congestion window computations in bytes. | 68 // Used in QUIC for congestion window computations in bytes. |
| 69 const QuicByteCount kDefaultTCPMSS = 1460; | 69 const QuicByteCount kDefaultTCPMSS = 1460; |
| 70 | 70 |
| 71 // We match SPDY's use of 32 when secure (since we'd compete with SPDY). | 71 // We match SPDY's use of 32 (since we'd compete with SPDY). |
| 72 const QuicPacketCount kInitialCongestionWindowSecure = 32; | 72 const QuicPacketCount kInitialCongestionWindow = 32; |
| 73 // Be conservative, and just use double a typical TCP ICWND for HTTP. | |
| 74 const QuicPacketCount kInitialCongestionWindowInsecure = 20; | |
| 75 | 73 |
| 76 // Minimum size of initial flow control window, for both stream and session. | 74 // Minimum size of initial flow control window, for both stream and session. |
| 77 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB | 75 const uint32 kMinimumFlowControlSendWindow = 16 * 1024; // 16 KB |
| 78 | 76 |
| 79 // Minimum size of the CWND, in packets, when doing bandwidth resumption. | 77 // Minimum size of the CWND, in packets, when doing bandwidth resumption. |
| 80 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; | 78 const QuicPacketCount kMinCongestionWindowForBandwidthResumption = 10; |
| 81 | 79 |
| 82 // Maximum size of the CWND, in packets. | 80 // Maximum size of the CWND, in packets. |
| 83 const QuicPacketCount kMaxCongestionWindow = 200; | 81 const QuicPacketCount kMaxCongestionWindow = 200; |
| 84 | 82 |
| (...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1221 : iov(iov), iov_count(iov_count), total_length(total_length) {} | 1219 : iov(iov), iov_count(iov_count), total_length(total_length) {} |
| 1222 | 1220 |
| 1223 const struct iovec* iov; | 1221 const struct iovec* iov; |
| 1224 const int iov_count; | 1222 const int iov_count; |
| 1225 const size_t total_length; | 1223 const size_t total_length; |
| 1226 }; | 1224 }; |
| 1227 | 1225 |
| 1228 } // namespace net | 1226 } // namespace net |
| 1229 | 1227 |
| 1230 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1228 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |