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 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 } | 336 } |
337 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) { | 337 if (config.HasClientSentConnectionOption(kAKD3, perspective_)) { |
338 ack_mode_ = ACK_DECIMATION; | 338 ack_mode_ = ACK_DECIMATION; |
339 ack_decimation_delay_ = kShortAckDecimationDelay; | 339 ack_decimation_delay_ = kShortAckDecimationDelay; |
340 } | 340 } |
341 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) { | 341 if (config.HasClientSentConnectionOption(kAKD4, perspective_)) { |
342 ack_mode_ = ACK_DECIMATION_WITH_REORDERING; | 342 ack_mode_ = ACK_DECIMATION_WITH_REORDERING; |
343 ack_decimation_delay_ = kShortAckDecimationDelay; | 343 ack_decimation_delay_ = kShortAckDecimationDelay; |
344 } | 344 } |
345 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) { | 345 if (config.HasClientSentConnectionOption(k5RTO, perspective_)) { |
346 if (perspective_ == Perspective::IS_CLIENT || | 346 close_connection_after_five_rtos_ = true; |
347 !FLAGS_quic_reloadable_flag_quic_only_5rto_client_side) { | |
348 close_connection_after_five_rtos_ = true; | |
349 } | |
350 } | 347 } |
351 } | 348 } |
352 | 349 |
353 void QuicConnection::OnSendConnectionState( | 350 void QuicConnection::OnSendConnectionState( |
354 const CachedNetworkParameters& cached_network_params) { | 351 const CachedNetworkParameters& cached_network_params) { |
355 if (debug_visitor_ != nullptr) { | 352 if (debug_visitor_ != nullptr) { |
356 debug_visitor_->OnSendConnectionState(cached_network_params); | 353 debug_visitor_->OnSendConnectionState(cached_network_params); |
357 } | 354 } |
358 } | 355 } |
359 | 356 |
(...skipping 2041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 | 2398 |
2402 void QuicConnection::CheckIfApplicationLimited() { | 2399 void QuicConnection::CheckIfApplicationLimited() { |
2403 if (queued_packets_.empty() && | 2400 if (queued_packets_.empty() && |
2404 !sent_packet_manager_.HasPendingRetransmissions() && | 2401 !sent_packet_manager_.HasPendingRetransmissions() && |
2405 !visitor_->WillingAndAbleToWrite()) { | 2402 !visitor_->WillingAndAbleToWrite()) { |
2406 sent_packet_manager_.OnApplicationLimited(); | 2403 sent_packet_manager_.OnApplicationLimited(); |
2407 } | 2404 } |
2408 } | 2405 } |
2409 | 2406 |
2410 } // namespace net | 2407 } // namespace net |
OLD | NEW |