| 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_CORE_QUIC_CONSTANTS_H_ | 5 #ifndef NET_QUIC_CORE_QUIC_CONSTANTS_H_ |
| 6 #define NET_QUIC_CORE_QUIC_CONSTANTS_H_ | 6 #define NET_QUIC_CORE_QUIC_CONSTANTS_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 |
| 9 #include <cstdint> | 10 #include <cstdint> |
| 10 #include <limits> | 11 #include <limits> |
| 11 | 12 |
| 12 #include "base/macros.h" | 13 #include "base/macros.h" |
| 13 #include "net/quic/core/quic_types.h" | 14 #include "net/quic/core/quic_types.h" |
| 15 #include "net/quic/platform/api/quic_export.h" |
| 14 | 16 |
| 15 // Definitions of constant values used throughout the QUIC code. | 17 // Definitions of constant values used throughout the QUIC code. |
| 16 | 18 |
| 17 namespace net { | 19 namespace net { |
| 18 | 20 |
| 19 // Simple time constants. | 21 // Simple time constants. |
| 20 const uint64_t kNumSecondsPerMinute = 60; | 22 const uint64_t kNumSecondsPerMinute = 60; |
| 21 const uint64_t kNumSecondsPerHour = kNumSecondsPerMinute * 60; | 23 const uint64_t kNumSecondsPerHour = kNumSecondsPerMinute * 60; |
| 22 const uint64_t kNumSecondsPerWeek = kNumSecondsPerHour * 24 * 7; | 24 const uint64_t kNumSecondsPerWeek = kNumSecondsPerHour * 24 * 7; |
| 23 const uint64_t kNumMicrosPerMilli = 1000; | 25 const uint64_t kNumMicrosPerMilli = 1000; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 const QuicStreamId kInvalidStreamId = 0; | 88 const QuicStreamId kInvalidStreamId = 0; |
| 87 | 89 |
| 88 // Reserved ID for the crypto stream. | 90 // Reserved ID for the crypto stream. |
| 89 const QuicStreamId kCryptoStreamId = 1; | 91 const QuicStreamId kCryptoStreamId = 1; |
| 90 | 92 |
| 91 // Reserved ID for the headers stream. | 93 // Reserved ID for the headers stream. |
| 92 const QuicStreamId kHeadersStreamId = 3; | 94 const QuicStreamId kHeadersStreamId = 3; |
| 93 | 95 |
| 94 // Header key used to identify final offset on data stream when sending HTTP/2 | 96 // Header key used to identify final offset on data stream when sending HTTP/2 |
| 95 // trailing headers over QUIC. | 97 // trailing headers over QUIC. |
| 96 NET_EXPORT_PRIVATE extern const char* const kFinalOffsetHeaderKey; | 98 QUIC_EXPORT_PRIVATE extern const char* const kFinalOffsetHeaderKey; |
| 97 | 99 |
| 98 // Maximum delayed ack time, in ms. | 100 // Maximum delayed ack time, in ms. |
| 99 const int64_t kMaxDelayedAckTimeMs = 25; | 101 const int64_t kMaxDelayedAckTimeMs = 25; |
| 100 | 102 |
| 101 // Minimum tail loss probe time in ms. | 103 // Minimum tail loss probe time in ms. |
| 102 static const int64_t kMinTailLossProbeTimeoutMs = 10; | 104 static const int64_t kMinTailLossProbeTimeoutMs = 10; |
| 103 | 105 |
| 104 // The timeout before the handshake succeeds. | 106 // The timeout before the handshake succeeds. |
| 105 const int64_t kInitialIdleTimeoutSecs = 5; | 107 const int64_t kInitialIdleTimeoutSecs = 5; |
| 106 // The default idle timeout. | 108 // The default idle timeout. |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 // duplicated. | 180 // duplicated. |
| 179 const size_t kDiversificationNonceSize = 32; | 181 const size_t kDiversificationNonceSize = 32; |
| 180 | 182 |
| 181 // The largest gap in packets we'll accept without closing the connection. | 183 // The largest gap in packets we'll accept without closing the connection. |
| 182 // This will likely have to be tuned. | 184 // This will likely have to be tuned. |
| 183 const QuicPacketNumber kMaxPacketGap = 5000; | 185 const QuicPacketNumber kMaxPacketGap = 5000; |
| 184 | 186 |
| 185 } // namespace net | 187 } // namespace net |
| 186 | 188 |
| 187 #endif // NET_QUIC_CORE_QUIC_CONSTANTS_H_ | 189 #endif // NET_QUIC_CORE_QUIC_CONSTANTS_H_ |
| OLD | NEW |