| 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> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // serialized packet into the TransmissionInfo. | 35 // serialized packet into the TransmissionInfo. |
| 36 void AddSentPacket(SerializedPacket* serialized_packet, | 36 void AddSentPacket(SerializedPacket* serialized_packet, |
| 37 QuicPacketNumber old_packet_number, | 37 QuicPacketNumber old_packet_number, |
| 38 TransmissionType transmission_type, | 38 TransmissionType transmission_type, |
| 39 QuicTime sent_time, | 39 QuicTime sent_time, |
| 40 bool set_in_flight); | 40 bool set_in_flight); |
| 41 | 41 |
| 42 // Returns true if the packet |packet_number| is unacked. | 42 // Returns true if the packet |packet_number| is unacked. |
| 43 bool IsUnacked(QuicPacketNumber packet_number) const; | 43 bool IsUnacked(QuicPacketNumber packet_number) const; |
| 44 | 44 |
| 45 // Sets the nack count to the max of the current nack count and |min_nacks|. | |
| 46 void NackPacket(QuicPacketNumber packet_number, uint16_t min_nacks); | |
| 47 | |
| 48 // Notifies all the AckListeners attached to the |info| and | 45 // Notifies all the AckListeners attached to the |info| and |
| 49 // clears them to ensure they're not notified again. | 46 // clears them to ensure they're not notified again. |
| 50 void NotifyAndClearListeners(std::list<AckListenerWrapper>* ack_listeners, | 47 void NotifyAndClearListeners(std::list<AckListenerWrapper>* ack_listeners, |
| 51 QuicTime::Delta delta_largest_observed); | 48 QuicTime::Delta delta_largest_observed); |
| 52 | 49 |
| 53 // Notifies all the AckListeners attached to |newest_transmission|. | 50 // Notifies all the AckListeners attached to |newest_transmission|. |
| 54 void NotifyAndClearListeners(QuicPacketNumber newest_transmission, | 51 void NotifyAndClearListeners(QuicPacketNumber newest_transmission, |
| 55 QuicTime::Delta delta_largest_observed); | 52 QuicTime::Delta delta_largest_observed); |
| 56 | 53 |
| 57 // Marks |info| as no longer in flight. | 54 // Marks |info| as no longer in flight. |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 QuicByteCount bytes_in_flight_; | 186 QuicByteCount bytes_in_flight_; |
| 190 // Number of retransmittable crypto handshake packets. | 187 // Number of retransmittable crypto handshake packets. |
| 191 size_t pending_crypto_packet_count_; | 188 size_t pending_crypto_packet_count_; |
| 192 | 189 |
| 193 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 190 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 194 }; | 191 }; |
| 195 | 192 |
| 196 } // namespace net | 193 } // namespace net |
| 197 | 194 |
| 198 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 195 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |