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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 116 |
117 // Default ping timeout. | 117 // Default ping timeout. |
118 const int64 kPingTimeoutSecs = 15; // 15 secs. | 118 const int64 kPingTimeoutSecs = 15; // 15 secs. |
119 | 119 |
120 // Minimum number of RTTs between Server Config Updates (SCUP) sent to client. | 120 // Minimum number of RTTs between Server Config Updates (SCUP) sent to client. |
121 const int kMinIntervalBetweenServerConfigUpdatesRTTs = 10; | 121 const int kMinIntervalBetweenServerConfigUpdatesRTTs = 10; |
122 | 122 |
123 // Minimum time between Server Config Updates (SCUP) sent to client. | 123 // Minimum time between Server Config Updates (SCUP) sent to client. |
124 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000; | 124 const int kMinIntervalBetweenServerConfigUpdatesMs = 1000; |
125 | 125 |
| 126 // Multiplier that allows server to accept slightly more streams than |
| 127 // negotiated in handshake. |
| 128 const float kMaxStreamsMultiplier = 1.1; |
| 129 |
126 // We define an unsigned 16-bit floating point value, inspired by IEEE floats | 130 // We define an unsigned 16-bit floating point value, inspired by IEEE floats |
127 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), | 131 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), |
128 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden | 132 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden |
129 // bit) and denormals, but without signs, transfinites or fractions. Wire format | 133 // bit) and denormals, but without signs, transfinites or fractions. Wire format |
130 // 16 bits (little-endian byte order) are split into exponent (high 5) and | 134 // 16 bits (little-endian byte order) are split into exponent (high 5) and |
131 // mantissa (low 11) and decoded as: | 135 // mantissa (low 11) and decoded as: |
132 // uint64 value; | 136 // uint64 value; |
133 // if (exponent == 0) value = mantissa; | 137 // if (exponent == 0) value = mantissa; |
134 // else value = (mantissa | 1 << 11) << (exponent - 1) | 138 // else value = (mantissa | 1 << 11) << (exponent - 1) |
135 const int kUFloat16ExponentBits = 5; | 139 const int kUFloat16ExponentBits = 5; |
(...skipping 936 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1072 SequenceNumberList* all_transmissions; | 1076 SequenceNumberList* all_transmissions; |
1073 // In flight packets have not been abandoned or lost. | 1077 // In flight packets have not been abandoned or lost. |
1074 bool in_flight; | 1078 bool in_flight; |
1075 // True if the packet can never be acked, so it can be removed. | 1079 // True if the packet can never be acked, so it can be removed. |
1076 bool is_unackable; | 1080 bool is_unackable; |
1077 }; | 1081 }; |
1078 | 1082 |
1079 } // namespace net | 1083 } // namespace net |
1080 | 1084 |
1081 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1085 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
OLD | NEW |