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 #include "net/quic/quic_config.h" | 5 #include "net/quic/quic_config.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "net/quic/quic_sent_packet_manager.h" | 10 #include "net/quic/quic_sent_packet_manager.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 congestion_control.push_back(kQBIC); | 325 congestion_control.push_back(kQBIC); |
326 congestion_control_.set(congestion_control, kQBIC); | 326 congestion_control_.set(congestion_control, kQBIC); |
327 idle_connection_state_lifetime_seconds_.set(kDefaultTimeoutSecs, | 327 idle_connection_state_lifetime_seconds_.set(kDefaultTimeoutSecs, |
328 kDefaultInitialTimeoutSecs); | 328 kDefaultInitialTimeoutSecs); |
329 // kKATO is optional. Return 0 if not negotiated. | 329 // kKATO is optional. Return 0 if not negotiated. |
330 keepalive_timeout_seconds_.set(0, 0); | 330 keepalive_timeout_seconds_.set(0, 0); |
331 max_streams_per_connection_.set(kDefaultMaxStreamsPerConnection, | 331 max_streams_per_connection_.set(kDefaultMaxStreamsPerConnection, |
332 kDefaultMaxStreamsPerConnection); | 332 kDefaultMaxStreamsPerConnection); |
333 max_time_before_crypto_handshake_ = QuicTime::Delta::FromSeconds( | 333 max_time_before_crypto_handshake_ = QuicTime::Delta::FromSeconds( |
334 kDefaultMaxTimeForCryptoHandshakeSecs); | 334 kDefaultMaxTimeForCryptoHandshakeSecs); |
335 server_initial_congestion_window_.set(kMaxInitialWindow, | 335 server_initial_congestion_window_.set(kDefaultInitialWindow, |
336 kDefaultInitialWindow); | 336 kDefaultInitialWindow); |
337 } | 337 } |
338 | 338 |
339 void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { | 339 void QuicConfig::ToHandshakeMessage(CryptoHandshakeMessage* out) const { |
340 congestion_control_.ToHandshakeMessage(out); | 340 congestion_control_.ToHandshakeMessage(out); |
341 idle_connection_state_lifetime_seconds_.ToHandshakeMessage(out); | 341 idle_connection_state_lifetime_seconds_.ToHandshakeMessage(out); |
342 keepalive_timeout_seconds_.ToHandshakeMessage(out); | 342 keepalive_timeout_seconds_.ToHandshakeMessage(out); |
343 max_streams_per_connection_.ToHandshakeMessage(out); | 343 max_streams_per_connection_.ToHandshakeMessage(out); |
344 server_initial_congestion_window_.ToHandshakeMessage(out); | 344 server_initial_congestion_window_.ToHandshakeMessage(out); |
345 // TODO(ianswett): Don't transmit parameters which are optional and not set. | 345 // TODO(ianswett): Don't transmit parameters which are optional and not set. |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
404 server_hello, error_details); | 404 server_hello, error_details); |
405 } | 405 } |
406 if (error == QUIC_NO_ERROR) { | 406 if (error == QUIC_NO_ERROR) { |
407 error = initial_round_trip_time_us_.ProcessServerHello( | 407 error = initial_round_trip_time_us_.ProcessServerHello( |
408 server_hello, error_details); | 408 server_hello, error_details); |
409 } | 409 } |
410 return error; | 410 return error; |
411 } | 411 } |
412 | 412 |
413 } // namespace net | 413 } // namespace net |
OLD | NEW |