| 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 const QuicByteCount kDefaultMaxPacketSize = 1350; | 53 const QuicByteCount kDefaultMaxPacketSize = 1350; |
| 54 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 54 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
| 55 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an | 55 // minus the IP and UDP headers. IPv6 has a 40 byte header, UPD adds an |
| 56 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 56 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
| 57 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 57 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
| 58 const QuicByteCount kMaxPacketSize = 1452; | 58 const QuicByteCount kMaxPacketSize = 1452; |
| 59 // Default maximum packet size used in Linux TCP implementations. | 59 // Default maximum packet size used in Linux TCP implementations. |
| 60 const QuicByteCount kDefaultTCPMSS = 1460; | 60 const QuicByteCount kDefaultTCPMSS = 1460; |
| 61 | 61 |
| 62 // Maximum size of the initial congestion window in packets. | 62 // Maximum size of the initial congestion window in packets. |
| 63 const QuicPacketCount kDefaultInitialWindow = 10; | |
| 64 const QuicPacketCount kMaxInitialWindow = 100; | 63 const QuicPacketCount kMaxInitialWindow = 100; |
| 64 // We match SPDY's use of 32 when secure (since we'd compete with SPDY). |
| 65 const QuicPacketCount kInitialCongestionWindowSecure = 32; |
| 66 // Be conservative, and just use double a typical TCP ICWND for HTTP. |
| 67 const QuicPacketCount kInitialCongestionWindowInsecure = 20; |
| 65 | 68 |
| 66 // Default size of initial flow control window, for both stream and session. | 69 // Default size of initial flow control window, for both stream and session. |
| 67 const uint32 kDefaultFlowControlSendWindow = 16 * 1024; // 16 KB | 70 const uint32 kDefaultFlowControlSendWindow = 16 * 1024; // 16 KB |
| 68 | 71 |
| 69 // Maximum size of the congestion window, in packets, for TCP congestion control | 72 // Maximum size of the congestion window, in packets, for TCP congestion control |
| 70 // algorithms. | 73 // algorithms. |
| 71 const size_t kMaxTcpCongestionWindow = 200; | 74 const size_t kMaxTcpCongestionWindow = 200; |
| 72 | 75 |
| 73 // Default size of the socket receive buffer in bytes. | 76 // Default size of the socket receive buffer in bytes. |
| 74 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; | 77 const QuicByteCount kDefaultSocketReceiveBuffer = 256 * 1024; |
| (...skipping 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1094 SequenceNumberList* all_transmissions; | 1097 SequenceNumberList* all_transmissions; |
| 1095 // In flight packets have not been abandoned or lost. | 1098 // In flight packets have not been abandoned or lost. |
| 1096 bool in_flight; | 1099 bool in_flight; |
| 1097 // True if the packet can never be acked, so it can be removed. | 1100 // True if the packet can never be acked, so it can be removed. |
| 1098 bool is_unackable; | 1101 bool is_unackable; |
| 1099 }; | 1102 }; |
| 1100 | 1103 |
| 1101 } // namespace net | 1104 } // namespace net |
| 1102 | 1105 |
| 1103 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1106 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |