| 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_CONSTANTS_H_ | 5 #ifndef NET_QUIC_QUIC_CONSTANTS_H_ |
| 6 #define NET_QUIC_QUIC_CONSTANTS_H_ | 6 #define NET_QUIC_QUIC_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <cstdint> | 9 #include <cstdint> |
| 10 #include <limits> | 10 #include <limits> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "net/quic/core/quic_types.h" | 13 #include "net/quic/core/quic_types.h" |
| 14 | 14 |
| 15 // Definitions of constant values used throughout the QUIC code. | 15 // Definitions of constant values used throughout the QUIC code. |
| 16 | 16 |
| 17 namespace net { | 17 namespace net { |
| 18 | 18 |
| 19 // Simple time constants. | 19 // Simple time constants. |
| 20 const uint64_t kNumSecondsPerMinute = 60; | 20 const uint64_t kNumSecondsPerMinute = 60; |
| 21 const uint64_t kNumSecondsPerHour = kNumSecondsPerMinute * 60; | 21 const uint64_t kNumSecondsPerHour = kNumSecondsPerMinute * 60; |
| 22 const uint64_t kNumSecondsPerWeek = kNumSecondsPerHour * 24 * 7; |
| 22 const uint64_t kNumMicrosPerMilli = 1000; | 23 const uint64_t kNumMicrosPerMilli = 1000; |
| 23 const uint64_t kNumMicrosPerSecond = 1000 * 1000; | 24 const uint64_t kNumMicrosPerSecond = 1000 * 1000; |
| 24 | 25 |
| 25 // Default initial maximum size in bytes of a QUIC packet. | 26 // Default initial maximum size in bytes of a QUIC packet. |
| 26 const QuicByteCount kDefaultMaxPacketSize = 1350; | 27 const QuicByteCount kDefaultMaxPacketSize = 1350; |
| 27 const QuicByteCount kDefaultServerMaxPacketSize = 1000; | 28 const QuicByteCount kDefaultServerMaxPacketSize = 1000; |
| 28 // The maximum packet size of any QUIC packet, based on ethernet's max size, | 29 // The maximum packet size of any QUIC packet, based on ethernet's max size, |
| 29 // minus the IP and UDP headers. IPv6 has a 40 byte header, UDP adds an | 30 // minus the IP and UDP headers. IPv6 has a 40 byte header, UDP adds an |
| 30 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's | 31 // additional 8 bytes. This is a total overhead of 48 bytes. Ethernet's |
| 31 // max packet size is 1500 bytes, 1500 - 48 = 1452. | 32 // max packet size is 1500 bytes, 1500 - 48 = 1452. |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 // duplicated. | 178 // duplicated. |
| 178 const size_t kDiversificationNonceSize = 32; | 179 const size_t kDiversificationNonceSize = 32; |
| 179 | 180 |
| 180 // The largest gap in packets we'll accept without closing the connection. | 181 // The largest gap in packets we'll accept without closing the connection. |
| 181 // This will likely have to be tuned. | 182 // This will likely have to be tuned. |
| 182 const QuicPacketNumber kMaxPacketGap = 5000; | 183 const QuicPacketNumber kMaxPacketGap = 5000; |
| 183 | 184 |
| 184 } // namespace net | 185 } // namespace net |
| 185 | 186 |
| 186 #endif // NET_QUIC_QUIC_CONSTANTS_H_ | 187 #endif // NET_QUIC_QUIC_CONSTANTS_H_ |
| OLD | NEW |