OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_CONFIG_H_ | 5 #ifndef NET_QUIC_QUIC_CONFIG_H_ |
6 #define NET_QUIC_QUIC_CONFIG_H_ | 6 #define NET_QUIC_QUIC_CONFIG_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 // Sets the maximum possible value that can be achieved after negotiation and | 86 // Sets the maximum possible value that can be achieved after negotiation and |
87 // also the default values to be assumed if PRESENCE_OPTIONAL and the *HLO msg | 87 // also the default values to be assumed if PRESENCE_OPTIONAL and the *HLO msg |
88 // doesn't contain a value corresponding to |name_|. |max| is serialised via | 88 // doesn't contain a value corresponding to |name_|. |max| is serialised via |
89 // ToHandshakeMessage call if |negotiated_| is false. | 89 // ToHandshakeMessage call if |negotiated_| is false. |
90 void set(uint32_t max, uint32_t default_value); | 90 void set(uint32_t max, uint32_t default_value); |
91 | 91 |
92 // Returns the value negotiated if |negotiated_| is true, otherwise returns | 92 // Returns the value negotiated if |negotiated_| is true, otherwise returns |
93 // default_value_ (used to set default values before negotiation finishes). | 93 // default_value_ (used to set default values before negotiation finishes). |
94 uint32_t GetUint32() const; | 94 uint32_t GetUint32() const; |
95 | 95 |
| 96 // Returns the maximum value negotiable. |
| 97 uint32_t GetMax() const; |
| 98 |
96 // Serialises |name_| and value to |out|. If |negotiated_| is true then | 99 // Serialises |name_| and value to |out|. If |negotiated_| is true then |
97 // |negotiated_value_| is serialised, otherwise |max_value_| is serialised. | 100 // |negotiated_value_| is serialised, otherwise |max_value_| is serialised. |
98 void ToHandshakeMessage(CryptoHandshakeMessage* out) const override; | 101 void ToHandshakeMessage(CryptoHandshakeMessage* out) const override; |
99 | 102 |
100 // Sets |negotiated_value_| to the minimum of |max_value_| and the | 103 // Sets |negotiated_value_| to the minimum of |max_value_| and the |
101 // corresponding value from |peer_hello|. If the corresponding value is | 104 // corresponding value from |peer_hello|. If the corresponding value is |
102 // missing and PRESENCE_OPTIONAL then |negotiated_value_| is set to | 105 // missing and PRESENCE_OPTIONAL then |negotiated_value_| is set to |
103 // |default_value_|. | 106 // |default_value_|. |
104 QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello, | 107 QuicErrorCode ProcessPeerHello(const CryptoHandshakeMessage& peer_hello, |
105 HelloType hello_type, | 108 HelloType hello_type, |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
312 void set_max_idle_time_before_crypto_handshake( | 315 void set_max_idle_time_before_crypto_handshake( |
313 QuicTime::Delta max_idle_time_before_crypto_handshake) { | 316 QuicTime::Delta max_idle_time_before_crypto_handshake) { |
314 max_idle_time_before_crypto_handshake_ = | 317 max_idle_time_before_crypto_handshake_ = |
315 max_idle_time_before_crypto_handshake; | 318 max_idle_time_before_crypto_handshake; |
316 } | 319 } |
317 | 320 |
318 QuicTime::Delta max_idle_time_before_crypto_handshake() const { | 321 QuicTime::Delta max_idle_time_before_crypto_handshake() const { |
319 return max_idle_time_before_crypto_handshake_; | 322 return max_idle_time_before_crypto_handshake_; |
320 } | 323 } |
321 | 324 |
| 325 QuicNegotiableUint32 idle_connection_state_lifetime_seconds() const { |
| 326 return idle_connection_state_lifetime_seconds_; |
| 327 } |
| 328 |
322 void set_max_undecryptable_packets(size_t max_undecryptable_packets) { | 329 void set_max_undecryptable_packets(size_t max_undecryptable_packets) { |
323 max_undecryptable_packets_ = max_undecryptable_packets; | 330 max_undecryptable_packets_ = max_undecryptable_packets; |
324 } | 331 } |
325 | 332 |
326 size_t max_undecryptable_packets() const { | 333 size_t max_undecryptable_packets() const { |
327 return max_undecryptable_packets_; | 334 return max_undecryptable_packets_; |
328 } | 335 } |
329 | 336 |
330 bool HasSetBytesForConnectionIdToSend() const; | 337 bool HasSetBytesForConnectionIdToSend() const; |
331 | 338 |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
451 // An alternate server address the client could connect to. | 458 // An alternate server address the client could connect to. |
452 QuicFixedIPEndPoint alternate_server_address_; | 459 QuicFixedIPEndPoint alternate_server_address_; |
453 | 460 |
454 // Force HOL blocking for measurement purposes. | 461 // Force HOL blocking for measurement purposes. |
455 QuicFixedUint32 force_hol_blocking_; | 462 QuicFixedUint32 force_hol_blocking_; |
456 }; | 463 }; |
457 | 464 |
458 } // namespace net | 465 } // namespace net |
459 | 466 |
460 #endif // NET_QUIC_QUIC_CONFIG_H_ | 467 #endif // NET_QUIC_QUIC_CONFIG_H_ |
OLD | NEW |