| 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 | 103 |
| 104 // This is the default network timeout a for connection till the crypto | 104 // This is the default network timeout a for connection till the crypto |
| 105 // handshake succeeds and the negotiated timeout from the handshake is received. | 105 // handshake succeeds and the negotiated timeout from the handshake is received. |
| 106 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. | 106 const int64 kDefaultInitialTimeoutSecs = 120; // 2 mins. |
| 107 const int64 kDefaultTimeoutSecs = 60 * 10; // 10 minutes. | 107 const int64 kDefaultTimeoutSecs = 60 * 10; // 10 minutes. |
| 108 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 5; // 5 secs. | 108 const int64 kDefaultMaxTimeForCryptoHandshakeSecs = 5; // 5 secs. |
| 109 | 109 |
| 110 // Default ping timeout. | 110 // Default ping timeout. |
| 111 const int64 kPingTimeoutSecs = 15; // 15 secs. | 111 const int64 kPingTimeoutSecs = 15; // 15 secs. |
| 112 | 112 |
| 113 // Default max packets in an FEC group. | |
| 114 const size_t kMaxPacketsPerFecGroup = 10; | |
| 115 | |
| 116 // We define an unsigned 16-bit floating point value, inspired by IEEE floats | 113 // We define an unsigned 16-bit floating point value, inspired by IEEE floats |
| 117 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), | 114 // (http://en.wikipedia.org/wiki/Half_precision_floating-point_format), |
| 118 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden | 115 // with 5-bit exponent (bias 1), 11-bit mantissa (effective 12 with hidden |
| 119 // bit) and denormals, but without signs, transfinites or fractions. Wire format | 116 // bit) and denormals, but without signs, transfinites or fractions. Wire format |
| 120 // 16 bits (little-endian byte order) are split into exponent (high 5) and | 117 // 16 bits (little-endian byte order) are split into exponent (high 5) and |
| 121 // mantissa (low 11) and decoded as: | 118 // mantissa (low 11) and decoded as: |
| 122 // uint64 value; | 119 // uint64 value; |
| 123 // if (exponent == 0) value = mantissa; | 120 // if (exponent == 0) value = mantissa; |
| 124 // else value = (mantissa | 1 << 11) << (exponent - 1) | 121 // else value = (mantissa | 1 << 11) << (exponent - 1) |
| 125 const int kUFloat16ExponentBits = 5; | 122 const int kUFloat16ExponentBits = 5; |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1067 // Stores the sequence numbers of all transmissions of this packet. | 1064 // Stores the sequence numbers of all transmissions of this packet. |
| 1068 // Can never be null. | 1065 // Can never be null. |
| 1069 SequenceNumberSet* all_transmissions; | 1066 SequenceNumberSet* all_transmissions; |
| 1070 // In flight packets have not been abandoned or lost. | 1067 // In flight packets have not been abandoned or lost. |
| 1071 bool in_flight; | 1068 bool in_flight; |
| 1072 }; | 1069 }; |
| 1073 | 1070 |
| 1074 } // namespace net | 1071 } // namespace net |
| 1075 | 1072 |
| 1076 #endif // NET_QUIC_QUIC_PROTOCOL_H_ | 1073 #endif // NET_QUIC_QUIC_PROTOCOL_H_ |
| OLD | NEW |