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 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1261 } | 1261 } |
1262 } | 1262 } |
1263 | 1263 |
1264 void QuicConnection::RetransmitUnackedPackets( | 1264 void QuicConnection::RetransmitUnackedPackets( |
1265 RetransmissionType retransmission_type) { | 1265 RetransmissionType retransmission_type) { |
1266 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); | 1266 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); |
1267 | 1267 |
1268 WriteIfNotBlocked(); | 1268 WriteIfNotBlocked(); |
1269 } | 1269 } |
1270 | 1270 |
1271 void QuicConnection::NeuterUnencryptedPackets() { | 1271 void QuicConnection::DiscardUnencryptedPackets() { |
1272 sent_packet_manager_.NeuterUnencryptedPackets(); | 1272 sent_packet_manager_.DiscardUnencryptedPackets(); |
1273 // This may have changed the retransmission timer, so re-arm it. | 1273 // This may have changed the retransmission timer, so re-arm it. |
1274 retransmission_alarm_->Cancel(); | 1274 retransmission_alarm_->Cancel(); |
1275 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); | 1275 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); |
1276 if (retransmission_time != QuicTime::Zero()) { | 1276 if (retransmission_time != QuicTime::Zero()) { |
1277 retransmission_alarm_->Set(retransmission_time); | 1277 retransmission_alarm_->Set(retransmission_time); |
1278 } | 1278 } |
1279 } | 1279 } |
1280 | 1280 |
1281 bool QuicConnection::ShouldGeneratePacket( | 1281 bool QuicConnection::ShouldGeneratePacket( |
1282 TransmissionType transmission_type, | 1282 TransmissionType transmission_type, |
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1962 // If we changed the generator's batch state, restore original batch state. | 1962 // If we changed the generator's batch state, restore original batch state. |
1963 if (!already_in_batch_mode_) { | 1963 if (!already_in_batch_mode_) { |
1964 DVLOG(1) << "Leaving Batch Mode."; | 1964 DVLOG(1) << "Leaving Batch Mode."; |
1965 connection_->packet_generator_.FinishBatchOperations(); | 1965 connection_->packet_generator_.FinishBatchOperations(); |
1966 } | 1966 } |
1967 DCHECK_EQ(already_in_batch_mode_, | 1967 DCHECK_EQ(already_in_batch_mode_, |
1968 connection_->packet_generator_.InBatchMode()); | 1968 connection_->packet_generator_.InBatchMode()); |
1969 } | 1969 } |
1970 | 1970 |
1971 } // namespace net | 1971 } // namespace net |
OLD | NEW |