| 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 #include "net/quic/core/quic_connection.h" | 5 #include "net/quic/core/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 367 } | 367 } |
| 368 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) { | 368 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) { |
| 369 ack_mode_ = ACK_DECIMATION; | 369 ack_mode_ = ACK_DECIMATION; |
| 370 ack_decimation_delay_ = kShortAckDecimationDelay; | 370 ack_decimation_delay_ = kShortAckDecimationDelay; |
| 371 } | 371 } |
| 372 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) { | 372 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) { |
| 373 ack_mode_ = ACK_DECIMATION_WITH_REORDERING; | 373 ack_mode_ = ACK_DECIMATION_WITH_REORDERING; |
| 374 ack_decimation_delay_ = kShortAckDecimationDelay; | 374 ack_decimation_delay_ = kShortAckDecimationDelay; |
| 375 } | 375 } |
| 376 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) { | 376 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) { |
| 377 close_connection_after_five_rtos_ = true; | 377 if (perspective_ == Perspective::IS_CLIENT || |
| 378 !FLAGS_quic_only_5rto_client_side) { |
| 379 close_connection_after_five_rtos_ = true; |
| 380 } |
| 378 } | 381 } |
| 379 } | 382 } |
| 380 | 383 |
| 381 void QuicConnection::OnSendConnectionState( | 384 void QuicConnection::OnSendConnectionState( |
| 382 const CachedNetworkParameters& cached_network_params) { | 385 const CachedNetworkParameters& cached_network_params) { |
| 383 if (debug_visitor_ != nullptr) { | 386 if (debug_visitor_ != nullptr) { |
| 384 debug_visitor_->OnSendConnectionState(cached_network_params); | 387 debug_visitor_->OnSendConnectionState(cached_network_params); |
| 385 } | 388 } |
| 386 } | 389 } |
| 387 | 390 |
| (...skipping 2135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2523 | 2526 |
| 2524 void QuicConnection::CheckIfApplicationLimited() { | 2527 void QuicConnection::CheckIfApplicationLimited() { |
| 2525 if (queued_packets_.empty() && | 2528 if (queued_packets_.empty() && |
| 2526 !sent_packet_manager_->HasPendingRetransmissions() && | 2529 !sent_packet_manager_->HasPendingRetransmissions() && |
| 2527 !visitor_->WillingAndAbleToWrite()) { | 2530 !visitor_->WillingAndAbleToWrite()) { |
| 2528 sent_packet_manager_->OnApplicationLimited(); | 2531 sent_packet_manager_->OnApplicationLimited(); |
| 2529 } | 2532 } |
| 2530 } | 2533 } |
| 2531 | 2534 |
| 2532 } // namespace net | 2535 } // namespace net |
| OLD | NEW |