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 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1294 } | 1294 } |
1295 } | 1295 } |
1296 | 1296 |
1297 void QuicConnection::RetransmitUnackedPackets( | 1297 void QuicConnection::RetransmitUnackedPackets( |
1298 RetransmissionType retransmission_type) { | 1298 RetransmissionType retransmission_type) { |
1299 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); | 1299 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); |
1300 | 1300 |
1301 WriteIfNotBlocked(); | 1301 WriteIfNotBlocked(); |
1302 } | 1302 } |
1303 | 1303 |
1304 void QuicConnection::DiscardUnencryptedPackets() { | 1304 void QuicConnection::NeuterUnencryptedPackets() { |
1305 sent_packet_manager_.DiscardUnencryptedPackets(); | 1305 sent_packet_manager_.NeuterUnencryptedPackets(); |
1306 // This may have changed the retransmission timer, so re-arm it. | 1306 // This may have changed the retransmission timer, so re-arm it. |
1307 retransmission_alarm_->Cancel(); | 1307 retransmission_alarm_->Cancel(); |
1308 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); | 1308 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); |
1309 if (retransmission_time != QuicTime::Zero()) { | 1309 if (retransmission_time != QuicTime::Zero()) { |
1310 retransmission_alarm_->Set(retransmission_time); | 1310 retransmission_alarm_->Set(retransmission_time); |
1311 } | 1311 } |
1312 } | 1312 } |
1313 | 1313 |
1314 bool QuicConnection::ShouldGeneratePacket( | 1314 bool QuicConnection::ShouldGeneratePacket( |
1315 TransmissionType transmission_type, | 1315 TransmissionType transmission_type, |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1998 // If we changed the generator's batch state, restore original batch state. | 1998 // If we changed the generator's batch state, restore original batch state. |
1999 if (!already_in_batch_mode_) { | 1999 if (!already_in_batch_mode_) { |
2000 DVLOG(1) << "Leaving Batch Mode."; | 2000 DVLOG(1) << "Leaving Batch Mode."; |
2001 connection_->packet_generator_.FinishBatchOperations(); | 2001 connection_->packet_generator_.FinishBatchOperations(); |
2002 } | 2002 } |
2003 DCHECK_EQ(already_in_batch_mode_, | 2003 DCHECK_EQ(already_in_batch_mode_, |
2004 connection_->packet_generator_.InBatchMode()); | 2004 connection_->packet_generator_.InBatchMode()); |
2005 } | 2005 } |
2006 | 2006 |
2007 } // namespace net | 2007 } // namespace net |
OLD | NEW |