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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
543 // Only track packets as in flight that the send algorithm wants us to track. | 543 // Only track packets as in flight that the send algorithm wants us to track. |
544 const bool in_flight = | 544 const bool in_flight = |
545 send_algorithm_->OnPacketSent(sent_time, | 545 send_algorithm_->OnPacketSent(sent_time, |
546 unacked_packets_.bytes_in_flight(), | 546 unacked_packets_.bytes_in_flight(), |
547 sequence_number, | 547 sequence_number, |
548 bytes, | 548 bytes, |
549 has_retransmittable_data); | 549 has_retransmittable_data); |
550 unacked_packets_.SetSent(sequence_number, sent_time, bytes, in_flight); | 550 unacked_packets_.SetSent(sequence_number, sent_time, bytes, in_flight); |
551 | 551 |
552 if (debug_delegate_ != NULL) { | 552 if (debug_delegate_ != NULL) { |
553 debug_delegate_->OnSentPacket(sequence_number, sent_time, bytes); | 553 debug_delegate_->OnSentPacket( |
| 554 sequence_number, sent_time, bytes, transmission_type); |
554 } | 555 } |
555 | 556 |
556 // Reset the retransmission timer anytime a pending packet is sent. | 557 // Reset the retransmission timer anytime a pending packet is sent. |
557 return in_flight; | 558 return in_flight; |
558 } | 559 } |
559 | 560 |
560 void QuicSentPacketManager::OnRetransmissionTimeout() { | 561 void QuicSentPacketManager::OnRetransmissionTimeout() { |
561 DCHECK(unacked_packets_.HasInFlightPackets()); | 562 DCHECK(unacked_packets_.HasInFlightPackets()); |
562 DCHECK_EQ(0u, pending_timer_transmission_count_); | 563 DCHECK_EQ(0u, pending_timer_transmission_count_); |
563 // Handshake retransmission, timer based loss detection, TLP, and RTO are | 564 // Handshake retransmission, timer based loss detection, TLP, and RTO are |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
892 | 893 |
893 // Set up a pacing sender with a 5 millisecond alarm granularity. | 894 // Set up a pacing sender with a 5 millisecond alarm granularity. |
894 using_pacing_ = true; | 895 using_pacing_ = true; |
895 send_algorithm_.reset( | 896 send_algorithm_.reset( |
896 new PacingSender(send_algorithm_.release(), | 897 new PacingSender(send_algorithm_.release(), |
897 QuicTime::Delta::FromMilliseconds(5), | 898 QuicTime::Delta::FromMilliseconds(5), |
898 kInitialUnpacedBurst)); | 899 kInitialUnpacedBurst)); |
899 } | 900 } |
900 | 901 |
901 } // namespace net | 902 } // namespace net |
OLD | NEW |