| 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/quic_connection.h" | 5 #include "net/quic/quic_connection.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <sys/types.h> | 8 #include <sys/types.h> |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 timeout_alarm_(helper->CreateAlarm(new TimeoutAlarm(this))), | 221 timeout_alarm_(helper->CreateAlarm(new TimeoutAlarm(this))), |
| 222 ping_alarm_(helper->CreateAlarm(new PingAlarm(this))), | 222 ping_alarm_(helper->CreateAlarm(new PingAlarm(this))), |
| 223 packet_generator_(connection_id_, &framer_, random_generator_, this), | 223 packet_generator_(connection_id_, &framer_, random_generator_, this), |
| 224 idle_network_timeout_( | 224 idle_network_timeout_( |
| 225 QuicTime::Delta::FromSeconds(kDefaultInitialTimeoutSecs)), | 225 QuicTime::Delta::FromSeconds(kDefaultInitialTimeoutSecs)), |
| 226 overall_connection_timeout_(QuicTime::Delta::Infinite()), | 226 overall_connection_timeout_(QuicTime::Delta::Infinite()), |
| 227 time_of_last_received_packet_(clock_->ApproximateNow()), | 227 time_of_last_received_packet_(clock_->ApproximateNow()), |
| 228 time_of_last_sent_new_packet_(clock_->ApproximateNow()), | 228 time_of_last_sent_new_packet_(clock_->ApproximateNow()), |
| 229 sequence_number_of_last_sent_packet_(0), | 229 sequence_number_of_last_sent_packet_(0), |
| 230 sent_packet_manager_( | 230 sent_packet_manager_( |
| 231 is_server, clock_, &stats_, kCubic, | 231 is_server, clock_, &stats_, |
| 232 FLAGS_quic_use_bbr_congestion_control ? kBBR : kCubic, |
| 232 FLAGS_quic_use_time_loss_detection ? kTime : kNack), | 233 FLAGS_quic_use_time_loss_detection ? kTime : kNack), |
| 233 version_negotiation_state_(START_NEGOTIATION), | 234 version_negotiation_state_(START_NEGOTIATION), |
| 234 is_server_(is_server), | 235 is_server_(is_server), |
| 235 connected_(true), | 236 connected_(true), |
| 236 peer_ip_changed_(false), | 237 peer_ip_changed_(false), |
| 237 peer_port_changed_(false), | 238 peer_port_changed_(false), |
| 238 self_ip_changed_(false), | 239 self_ip_changed_(false), |
| 239 self_port_changed_(false) { | 240 self_port_changed_(false) { |
| 240 #if 0 | 241 #if 0 |
| 241 // TODO(rtenneti): Should we enable this code in chromium? | 242 // TODO(rtenneti): Should we enable this code in chromium? |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1998 // If we changed the generator's batch state, restore original batch state. | 1999 // If we changed the generator's batch state, restore original batch state. |
| 1999 if (!already_in_batch_mode_) { | 2000 if (!already_in_batch_mode_) { |
| 2000 DVLOG(1) << "Leaving Batch Mode."; | 2001 DVLOG(1) << "Leaving Batch Mode."; |
| 2001 connection_->packet_generator_.FinishBatchOperations(); | 2002 connection_->packet_generator_.FinishBatchOperations(); |
| 2002 } | 2003 } |
| 2003 DCHECK_EQ(already_in_batch_mode_, | 2004 DCHECK_EQ(already_in_batch_mode_, |
| 2004 connection_->packet_generator_.InBatchMode()); | 2005 connection_->packet_generator_.InBatchMode()); |
| 2005 } | 2006 } |
| 2006 | 2007 |
| 2007 } // namespace net | 2008 } // namespace net |
| OLD | NEW |