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 |
11 #include <string> | 11 #include <string> |
12 | 12 |
13 #include "net/base/net_export.h" | 13 #include "net/base/net_export.h" |
14 #include "net/quic/core/quic_protocol.h" | 14 #include "net/quic/core/quic_packets.h" |
15 #include "net/quic/core/quic_time.h" | 15 #include "net/quic/core/quic_time.h" |
16 | 16 |
17 namespace net { | 17 namespace net { |
18 | 18 |
19 namespace test { | 19 namespace test { |
20 class QuicConfigPeer; | 20 class QuicConfigPeer; |
21 } // namespace test | 21 } // namespace test |
22 | 22 |
23 class CryptoHandshakeMessage; | 23 class CryptoHandshakeMessage; |
24 | 24 |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 bool SetInitialReceivedConnectionOptions(const QuicTagVector& tags); | 234 bool SetInitialReceivedConnectionOptions(const QuicTagVector& tags); |
235 | 235 |
236 QuicTagVector ReceivedConnectionOptions() const; | 236 QuicTagVector ReceivedConnectionOptions() const; |
237 | 237 |
238 bool HasSendConnectionOptions() const; | 238 bool HasSendConnectionOptions() const; |
239 | 239 |
240 QuicTagVector SendConnectionOptions() const; | 240 QuicTagVector SendConnectionOptions() const; |
241 | 241 |
242 // Returns true if the client is sending or the server has received a | 242 // Returns true if the client is sending or the server has received a |
243 // connection option. | 243 // connection option. |
| 244 // TODO(ianswett): Rename to HasClientRequestedSharedOption |
244 bool HasClientSentConnectionOption(QuicTag tag, | 245 bool HasClientSentConnectionOption(QuicTag tag, |
245 Perspective perspective) const; | 246 Perspective perspective) const; |
246 | 247 |
| 248 void SetClientConnectionOptions( |
| 249 const QuicTagVector& client_connection_options); |
| 250 |
| 251 // Returns true if the client has requested the specified connection option. |
| 252 // Checks the client connection options if the |perspective| is client and |
| 253 // connection options if the |perspective| is the server. |
| 254 bool HasClientRequestedIndependentOption(QuicTag tag, |
| 255 Perspective perspective) const; |
| 256 |
247 void SetIdleNetworkTimeout(QuicTime::Delta max_idle_network_timeout, | 257 void SetIdleNetworkTimeout(QuicTime::Delta max_idle_network_timeout, |
248 QuicTime::Delta default_idle_network_timeout); | 258 QuicTime::Delta default_idle_network_timeout); |
249 | 259 |
250 QuicTime::Delta IdleNetworkTimeout() const; | 260 QuicTime::Delta IdleNetworkTimeout() const; |
251 | 261 |
252 void SetSilentClose(bool silent_close); | 262 void SetSilentClose(bool silent_close); |
253 | 263 |
254 bool SilentClose() const; | 264 bool SilentClose() const; |
255 | 265 |
256 void SetMaxStreamsPerConnection(size_t max_streams, size_t default_streams); | 266 void SetMaxStreamsPerConnection(size_t max_streams, size_t default_streams); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 void SetDefaults(); | 390 void SetDefaults(); |
381 | 391 |
382 // Configurations options that are not negotiated. | 392 // Configurations options that are not negotiated. |
383 // Maximum time the session can be alive before crypto handshake is finished. | 393 // Maximum time the session can be alive before crypto handshake is finished. |
384 QuicTime::Delta max_time_before_crypto_handshake_; | 394 QuicTime::Delta max_time_before_crypto_handshake_; |
385 // Maximum idle time before the crypto handshake has completed. | 395 // Maximum idle time before the crypto handshake has completed. |
386 QuicTime::Delta max_idle_time_before_crypto_handshake_; | 396 QuicTime::Delta max_idle_time_before_crypto_handshake_; |
387 // Maximum number of undecryptable packets stored before CHLO/SHLO. | 397 // Maximum number of undecryptable packets stored before CHLO/SHLO. |
388 size_t max_undecryptable_packets_; | 398 size_t max_undecryptable_packets_; |
389 | 399 |
390 // Connection options. | 400 // Connection options which affect the server side. May also affect the |
| 401 // client side in cases when identical behavior is desirable. |
391 QuicFixedTagVector connection_options_; | 402 QuicFixedTagVector connection_options_; |
| 403 // Connection options which only affect the client side. |
| 404 QuicFixedTagVector client_connection_options_; |
392 // Idle network timeout in seconds. | 405 // Idle network timeout in seconds. |
393 QuicNegotiableUint32 idle_network_timeout_seconds_; | 406 QuicNegotiableUint32 idle_network_timeout_seconds_; |
394 // Whether to use silent close. Defaults to 0 (false) and is otherwise true. | 407 // Whether to use silent close. Defaults to 0 (false) and is otherwise true. |
395 QuicNegotiableUint32 silent_close_; | 408 QuicNegotiableUint32 silent_close_; |
396 // Maximum number of streams that the connection can support. | 409 // Maximum number of streams that the connection can support. |
397 // TODO(rjshade): Remove when removing QUIC_VERSION_34 | 410 // TODO(rjshade): Remove when removing QUIC_VERSION_34 |
398 QuicNegotiableUint32 max_streams_per_connection_; | 411 QuicNegotiableUint32 max_streams_per_connection_; |
399 // Maximum number of incoming dynamic streams that the connection can support. | 412 // Maximum number of incoming dynamic streams that the connection can support. |
400 QuicFixedUint32 max_incoming_dynamic_streams_; | 413 QuicFixedUint32 max_incoming_dynamic_streams_; |
401 // The number of bytes required for the connection ID. | 414 // The number of bytes required for the connection ID. |
(...skipping 19 matching lines...) Expand all Loading... |
421 // An alternate server address the client could connect to. | 434 // An alternate server address the client could connect to. |
422 QuicFixedSocketAddress alternate_server_address_; | 435 QuicFixedSocketAddress alternate_server_address_; |
423 | 436 |
424 // Force HOL blocking for measurement purposes. | 437 // Force HOL blocking for measurement purposes. |
425 QuicFixedUint32 force_hol_blocking_; | 438 QuicFixedUint32 force_hol_blocking_; |
426 }; | 439 }; |
427 | 440 |
428 } // namespace net | 441 } // namespace net |
429 | 442 |
430 #endif // NET_QUIC_QUIC_CONFIG_H_ | 443 #endif // NET_QUIC_QUIC_CONFIG_H_ |
OLD | NEW |