| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 packet_generator_(connection_id_, | 246 packet_generator_(connection_id_, |
| 247 &framer_, | 247 &framer_, |
| 248 random_generator_, | 248 random_generator_, |
| 249 helper->GetBufferAllocator(), | 249 helper->GetBufferAllocator(), |
| 250 this), | 250 this), |
| 251 idle_network_timeout_(QuicTime::Delta::Infinite()), | 251 idle_network_timeout_(QuicTime::Delta::Infinite()), |
| 252 handshake_timeout_(QuicTime::Delta::Infinite()), | 252 handshake_timeout_(QuicTime::Delta::Infinite()), |
| 253 time_of_last_received_packet_(clock_->ApproximateNow()), | 253 time_of_last_received_packet_(clock_->ApproximateNow()), |
| 254 time_of_last_sent_new_packet_(clock_->ApproximateNow()), | 254 time_of_last_sent_new_packet_(clock_->ApproximateNow()), |
| 255 last_send_for_timeout_(clock_->ApproximateNow()), | 255 last_send_for_timeout_(clock_->ApproximateNow()), |
| 256 sent_packet_manager_(perspective, clock_, &stats_, kCubicBytes, kNack), | 256 sent_packet_manager_( |
| 257 perspective, |
| 258 clock_, |
| 259 &stats_, |
| 260 FLAGS_quic_reloadable_flag_quic_default_to_bbr ? kBBR : kCubicBytes, |
| 261 kNack), |
| 257 version_negotiation_state_(START_NEGOTIATION), | 262 version_negotiation_state_(START_NEGOTIATION), |
| 258 perspective_(perspective), | 263 perspective_(perspective), |
| 259 connected_(true), | 264 connected_(true), |
| 260 can_truncate_connection_ids_(true), | 265 can_truncate_connection_ids_(true), |
| 261 mtu_discovery_target_(0), | 266 mtu_discovery_target_(0), |
| 262 mtu_probe_count_(0), | 267 mtu_probe_count_(0), |
| 263 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase), | 268 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase), |
| 264 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase), | 269 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase), |
| 265 largest_received_packet_size_(0), | 270 largest_received_packet_size_(0), |
| 266 goaway_sent_(false), | 271 goaway_sent_(false), |
| (...skipping 2157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2424 } | 2429 } |
| 2425 | 2430 |
| 2426 void QuicConnection::CheckIfApplicationLimited() { | 2431 void QuicConnection::CheckIfApplicationLimited() { |
| 2427 if (queued_packets_.empty() && | 2432 if (queued_packets_.empty() && |
| 2428 !sent_packet_manager_.HasPendingRetransmissions() && | 2433 !sent_packet_manager_.HasPendingRetransmissions() && |
| 2429 !visitor_->WillingAndAbleToWrite()) { | 2434 !visitor_->WillingAndAbleToWrite()) { |
| 2430 sent_packet_manager_.OnApplicationLimited(); | 2435 sent_packet_manager_.OnApplicationLimited(); |
| 2431 } | 2436 } |
| 2432 } | 2437 } |
| 2433 | 2438 |
| 2439 void QuicConnection::SetStreamNotifier( |
| 2440 StreamNotifierInterface* stream_notifier) { |
| 2441 sent_packet_manager_.SetStreamNotifier(stream_notifier); |
| 2442 } |
| 2443 |
| 2434 } // namespace net | 2444 } // namespace net |
| OLD | NEW |