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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 &framer_, | 258 &framer_, |
259 random_generator_, | 259 random_generator_, |
260 helper->GetBufferAllocator(), | 260 helper->GetBufferAllocator(), |
261 this), | 261 this), |
262 idle_network_timeout_(QuicTime::Delta::Infinite()), | 262 idle_network_timeout_(QuicTime::Delta::Infinite()), |
263 handshake_timeout_(QuicTime::Delta::Infinite()), | 263 handshake_timeout_(QuicTime::Delta::Infinite()), |
264 time_of_last_received_packet_(clock_->ApproximateNow()), | 264 time_of_last_received_packet_(clock_->ApproximateNow()), |
265 time_of_last_sent_new_packet_(clock_->ApproximateNow()), | 265 time_of_last_sent_new_packet_(clock_->ApproximateNow()), |
266 last_send_for_timeout_(clock_->ApproximateNow()), | 266 last_send_for_timeout_(clock_->ApproximateNow()), |
267 packet_number_of_last_sent_packet_(0), | 267 packet_number_of_last_sent_packet_(0), |
268 sent_packet_manager_(new QuicSentPacketManager(perspective, | 268 sent_packet_manager_(new QuicSentPacketManager( |
269 kDefaultPathId, | 269 perspective, |
270 clock_, | 270 kDefaultPathId, |
271 &stats_, | 271 clock_, |
272 kCubic, | 272 &stats_, |
273 kNack, | 273 FLAGS_quic_default_enable_cubic_bytes ? kCubicBytes : kCubic, |
274 /*delegate=*/nullptr)), | 274 kNack, |
| 275 /*delegate=*/nullptr)), |
275 version_negotiation_state_(START_NEGOTIATION), | 276 version_negotiation_state_(START_NEGOTIATION), |
276 perspective_(perspective), | 277 perspective_(perspective), |
277 connected_(true), | 278 connected_(true), |
278 can_truncate_connection_ids_(true), | 279 can_truncate_connection_ids_(true), |
279 mtu_discovery_target_(0), | 280 mtu_discovery_target_(0), |
280 mtu_probe_count_(0), | 281 mtu_probe_count_(0), |
281 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase), | 282 packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase), |
282 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase), | 283 next_mtu_probe_at_(kPacketsBetweenMtuProbesBase), |
283 largest_received_packet_size_(0), | 284 largest_received_packet_size_(0), |
284 goaway_sent_(false), | 285 goaway_sent_(false), |
(...skipping 2295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2580 | 2581 |
2581 void QuicConnection::CheckIfApplicationLimited() { | 2582 void QuicConnection::CheckIfApplicationLimited() { |
2582 if (queued_packets_.empty() && | 2583 if (queued_packets_.empty() && |
2583 !sent_packet_manager_->HasPendingRetransmissions() && | 2584 !sent_packet_manager_->HasPendingRetransmissions() && |
2584 !visitor_->WillingAndAbleToWrite()) { | 2585 !visitor_->WillingAndAbleToWrite()) { |
2585 sent_packet_manager_->OnApplicationLimited(); | 2586 sent_packet_manager_->OnApplicationLimited(); |
2586 } | 2587 } |
2587 } | 2588 } |
2588 | 2589 |
2589 } // namespace net | 2590 } // namespace net |
OLD | NEW |