OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_sent_packet_manager.h" | 5 #include "net/quic/quic_sent_packet_manager.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 for (SequenceNumberSet::const_iterator it = lost_packets.begin(); | 595 for (SequenceNumberSet::const_iterator it = lost_packets.begin(); |
596 it != lost_packets.end(); ++it) { | 596 it != lost_packets.end(); ++it) { |
597 QuicPacketSequenceNumber sequence_number = *it; | 597 QuicPacketSequenceNumber sequence_number = *it; |
598 const TransmissionInfo& transmission_info = | 598 const TransmissionInfo& transmission_info = |
599 unacked_packets_.GetTransmissionInfo(sequence_number); | 599 unacked_packets_.GetTransmissionInfo(sequence_number); |
600 // TODO(ianswett): If it's expected the FEC packet may repair the loss, it | 600 // TODO(ianswett): If it's expected the FEC packet may repair the loss, it |
601 // should be recorded as a loss to the send algorithm, but not retransmitted | 601 // should be recorded as a loss to the send algorithm, but not retransmitted |
602 // until it's known whether the FEC packet arrived. | 602 // until it's known whether the FEC packet arrived. |
603 ++stats_->packets_lost; | 603 ++stats_->packets_lost; |
604 packets_lost_[sequence_number] = transmission_info; | 604 packets_lost_[sequence_number] = transmission_info; |
| 605 DVLOG(1) << ENDPOINT << "Lost packet " << sequence_number; |
605 | 606 |
606 if (transmission_info.retransmittable_frames != NULL) { | 607 if (transmission_info.retransmittable_frames != NULL) { |
607 MarkForRetransmission(sequence_number, LOSS_RETRANSMISSION); | 608 MarkForRetransmission(sequence_number, LOSS_RETRANSMISSION); |
608 } else { | 609 } else { |
609 // Since we will not retransmit this, we need to remove it from | 610 // Since we will not retransmit this, we need to remove it from |
610 // unacked_packets_. This is either the current transmission of | 611 // unacked_packets_. This is either the current transmission of |
611 // a packet whose previous transmission has been acked, a packet that has | 612 // a packet whose previous transmission has been acked, a packet that has |
612 // been TLP retransmitted, or an FEC packet. | 613 // been TLP retransmitted, or an FEC packet. |
613 unacked_packets_.SetNotPending(sequence_number); | 614 unacked_packets_.SetNotPending(sequence_number); |
614 unacked_packets_.RemovePacket(sequence_number); | 615 unacked_packets_.RemovePacket(sequence_number); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 return; | 767 return; |
767 } | 768 } |
768 | 769 |
769 using_pacing_ = true; | 770 using_pacing_ = true; |
770 send_algorithm_.reset( | 771 send_algorithm_.reset( |
771 new PacingSender(send_algorithm_.release(), | 772 new PacingSender(send_algorithm_.release(), |
772 QuicTime::Delta::FromMicroseconds(1))); | 773 QuicTime::Delta::FromMicroseconds(1))); |
773 } | 774 } |
774 | 775 |
775 } // namespace net | 776 } // namespace net |
OLD | NEW |