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 <map> | 10 #include <map> |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 | 109 |
110 // This is the default network timeout a for connection till the crypto | 110 // This is the default network timeout a for connection till the crypto |
111 // handshake succeeds and the negotiated timeout from the handshake is received. | 111 // handshake succeeds and the negotiated timeout from the handshake is received. |
112 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. | 112 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. |
113 const int64 kDefaultTimeoutSecs = 60 * 10; // 10 minutes. | 113 const int64 kDefaultTimeoutSecs = 60 * 10; // 10 minutes. |
114 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 5; // 5 secs. | 114 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 5; // 5 secs. |
115 | 115 |
116 // Default ping timeout. | 116 // Default ping timeout. |
117 const int64 kPingTimeoutSecs = 15; // 15 secs. | 117 const int64 kPingTimeoutSecs = 15; // 15 secs. |
118 | 118 |
| 119 // Minimum number of RTTs between Server Config Updates (SCUP) sent to client. |
| 120 const int kMinIntervalBetweenServerConfigUpdatesRTTs = 10; |
| 121 |
| 122 // Minimum time between Server Config Updates (SCUP) sent to client. |
| 123 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000; |
| 124 |
119 // We define an unsigned 16-bit floating point value, inspired by IEEE floats | 125 // We define an unsigned 16-bit floating point value, inspired by IEEE floats |
120 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), | 126 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), |
121 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden | 127 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden |
122 // bit) and denormals, but without signs, transfinites or fractions. Wire format | 128 // bit) and denormals, but without signs, transfinites or fractions. Wire format |
123 // 16 bits (little-endian byte order) are split into exponent (high 5) and | 129 // 16 bits (little-endian byte order) are split into exponent (high 5) and |
124 // mantissa (low 11) and decoded as: | 130 // mantissa (low 11) and decoded as: |
125 // uint64 value; | 131 // uint64 value; |
126 // if (exponent == 0) value = mantissa; | 132 // if (exponent == 0) value = mantissa; |
127 // else value = (mantissa | 1 << 11) << (exponent - 1) | 133 // else value = (mantissa | 1 << 11) << (exponent - 1) |
128 const int kUFloat16ExponentBits = 5; | 134 const int kUFloat16ExponentBits = 5; |
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1066 // Stores the sequence numbers of all transmissions of this packet. | 1072 // Stores the sequence numbers of all transmissions of this packet. |
1067 // Can never be null. | 1073 // Can never be null. |
1068 SequenceNumberSet* all_transmissions; | 1074 SequenceNumberSet* all_transmissions; |
1069 // In flight packets have not been abandoned or lost. | 1075 // In flight packets have not been abandoned or lost. |
1070 bool in_flight; | 1076 bool in_flight; |
1071 }; | 1077 }; |
1072 | 1078 |
1073 } // namespace net | 1079 } // namespace net |
1074 | 1080 |
1075 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1081 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |