| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 ping_alarm_(helper->CreateAlarm(new PingAlarm(this))), | 220 ping_alarm_(helper->CreateAlarm(new PingAlarm(this))), |
| 221 debug_visitor_(NULL), | 221 debug_visitor_(NULL), |
| 222 packet_generator_(connection_id_, &framer_, random_generator_, this), | 222 packet_generator_(connection_id_, &framer_, random_generator_, this), |
| 223 idle_network_timeout_( | 223 idle_network_timeout_( |
| 224 QuicTime::Delta::FromSeconds(kDefaultInitialTimeoutSecs)), | 224 QuicTime::Delta::FromSeconds(kDefaultInitialTimeoutSecs)), |
| 225 overall_connection_timeout_(QuicTime::Delta::Infinite()), | 225 overall_connection_timeout_(QuicTime::Delta::Infinite()), |
| 226 time_of_last_received_packet_(clock_->ApproximateNow()), | 226 time_of_last_received_packet_(clock_->ApproximateNow()), |
| 227 time_of_last_sent_new_packet_(clock_->ApproximateNow()), | 227 time_of_last_sent_new_packet_(clock_->ApproximateNow()), |
| 228 sequence_number_of_last_sent_packet_(0), | 228 sequence_number_of_last_sent_packet_(0), |
| 229 sent_packet_manager_( | 229 sent_packet_manager_( |
| 230 is_server, clock_, &stats_, kTCP, | 230 is_server, clock_, &stats_, kCubic, |
| 231 FLAGS_quic_use_time_loss_detection ? kTime : kNack), | 231 FLAGS_quic_use_time_loss_detection ? kTime : kNack), |
| 232 version_negotiation_state_(START_NEGOTIATION), | 232 version_negotiation_state_(START_NEGOTIATION), |
| 233 is_server_(is_server), | 233 is_server_(is_server), |
| 234 connected_(true), | 234 connected_(true), |
| 235 peer_ip_changed_(false), | 235 peer_ip_changed_(false), |
| 236 peer_port_changed_(false), | 236 peer_port_changed_(false), |
| 237 self_ip_changed_(false), | 237 self_ip_changed_(false), |
| 238 self_port_changed_(false) { | 238 self_port_changed_(false) { |
| 239 if (!is_server_) { | 239 if (!is_server_) { |
| 240 // Pacing will be enabled if the client negotiates it. | 240 // Pacing will be enabled if the client negotiates it. |
| (...skipping 1741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1982 // If we changed the generator's batch state, restore original batch state. | 1982 // If we changed the generator's batch state, restore original batch state. |
| 1983 if (!already_in_batch_mode_) { | 1983 if (!already_in_batch_mode_) { |
| 1984 DVLOG(1) << "Leaving Batch Mode."; | 1984 DVLOG(1) << "Leaving Batch Mode."; |
| 1985 connection_->packet_generator_.FinishBatchOperations(); | 1985 connection_->packet_generator_.FinishBatchOperations(); |
| 1986 } | 1986 } |
| 1987 DCHECK_EQ(already_in_batch_mode_, | 1987 DCHECK_EQ(already_in_batch_mode_, |
| 1988 connection_->packet_generator_.InBatchMode()); | 1988 connection_->packet_generator_.InBatchMode()); |
| 1989 } | 1989 } |
| 1990 | 1990 |
| 1991 } // namespace net | 1991 } // namespace net |
| OLD | NEW |