| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 5 #ifndef NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| 6 #define NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 6 #define NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| 7 | 7 |
| 8 #include <stddef.h> |
| 9 |
| 8 #include <deque> | 10 #include <deque> |
| 9 | 11 |
| 12 #include "base/macros.h" |
| 10 #include "net/quic/quic_protocol.h" | 13 #include "net/quic/quic_protocol.h" |
| 11 | 14 |
| 12 namespace net { | 15 namespace net { |
| 13 | 16 |
| 14 class AckNotifierManager; | 17 class AckNotifierManager; |
| 15 | 18 |
| 16 // Class which tracks unacked packets for three purposes: | 19 // Class which tracks unacked packets for three purposes: |
| 17 // 1) Track retransmittable data, including multiple transmissions of frames. | 20 // 1) Track retransmittable data, including multiple transmissions of frames. |
| 18 // 2) Track packets and bytes in flight for congestion control. | 21 // 2) Track packets and bytes in flight for congestion control. |
| 19 // 3) Track sent time of packets to provide RTT measurements from acks. | 22 // 3) Track sent time of packets to provide RTT measurements from acks. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 34 QuicPacketNumber old_packet_number, | 37 QuicPacketNumber old_packet_number, |
| 35 TransmissionType transmission_type, | 38 TransmissionType transmission_type, |
| 36 QuicTime sent_time, | 39 QuicTime sent_time, |
| 37 QuicByteCount bytes_sent, | 40 QuicByteCount bytes_sent, |
| 38 bool set_in_flight); | 41 bool set_in_flight); |
| 39 | 42 |
| 40 // Returns true if the packet |packet_number| is unacked. | 43 // Returns true if the packet |packet_number| is unacked. |
| 41 bool IsUnacked(QuicPacketNumber packet_number) const; | 44 bool IsUnacked(QuicPacketNumber packet_number) const; |
| 42 | 45 |
| 43 // Sets the nack count to the max of the current nack count and |min_nacks|. | 46 // Sets the nack count to the max of the current nack count and |min_nacks|. |
| 44 void NackPacket(QuicPacketNumber packet_number, uint16 min_nacks); | 47 void NackPacket(QuicPacketNumber packet_number, uint16_t min_nacks); |
| 45 | 48 |
| 46 // Notifies all the AckListeners attached to the |info| and | 49 // Notifies all the AckListeners attached to the |info| and |
| 47 // clears them to ensure they're not notified again. | 50 // clears them to ensure they're not notified again. |
| 48 void NotifyAndClearListeners(std::list<AckListenerWrapper>* ack_listeners, | 51 void NotifyAndClearListeners(std::list<AckListenerWrapper>* ack_listeners, |
| 49 QuicTime::Delta delta_largest_observed); | 52 QuicTime::Delta delta_largest_observed); |
| 50 | 53 |
| 51 // Notifies all the AckListeners attached to |newest_transmission|. | 54 // Notifies all the AckListeners attached to |newest_transmission|. |
| 52 void NotifyAndClearListeners(QuicPacketNumber newest_transmission, | 55 void NotifyAndClearListeners(QuicPacketNumber newest_transmission, |
| 53 QuicTime::Delta delta_largest_observed); | 56 QuicTime::Delta delta_largest_observed); |
| 54 | 57 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 194 |
| 192 // Latched copy of gfe2_reloadable_flag_quic_track_single_retransmission. | 195 // Latched copy of gfe2_reloadable_flag_quic_track_single_retransmission. |
| 193 const bool track_single_retransmission_; | 196 const bool track_single_retransmission_; |
| 194 | 197 |
| 195 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 198 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 196 }; | 199 }; |
| 197 | 200 |
| 198 } // namespace net | 201 } // namespace net |
| 199 | 202 |
| 200 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 203 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |