| 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 // directly or through retransmissions. | 168 // directly or through retransmissions. |
| 169 bool IsPacketUsefulForRetransmittableData(const TransmissionInfo& info) const; | 169 bool IsPacketUsefulForRetransmittableData(const TransmissionInfo& info) const; |
| 170 | 170 |
| 171 // Returns true if the packet no longer has a purpose in the map. | 171 // Returns true if the packet no longer has a purpose in the map. |
| 172 bool IsPacketUseless(QuicPacketNumber packet_number, | 172 bool IsPacketUseless(QuicPacketNumber packet_number, |
| 173 const TransmissionInfo& info) const; | 173 const TransmissionInfo& info) const; |
| 174 | 174 |
| 175 QuicPacketNumber largest_sent_packet_; | 175 QuicPacketNumber largest_sent_packet_; |
| 176 QuicPacketNumber largest_observed_; | 176 QuicPacketNumber largest_observed_; |
| 177 | 177 |
| 178 // Newly serialized retransmittable and fec packets are added to this map, | 178 // Newly serialized retransmittable packets are added to this map, which |
| 179 // which contains owning pointers to any contained frames. If a packet is | 179 // contains owning pointers to any contained frames. If a packet is |
| 180 // retransmitted, this map will contain entries for both the old and the new | 180 // retransmitted, this map will contain entries for both the old and the new |
| 181 // packet. The old packet's retransmittable frames entry will be nullptr, | 181 // packet. The old packet's retransmittable frames entry will be nullptr, |
| 182 // while the new packet's entry will contain the frames to retransmit. | 182 // while the new packet's entry will contain the frames to retransmit. |
| 183 // If the old packet is acked before the new packet, then the old entry will | 183 // If the old packet is acked before the new packet, then the old entry will |
| 184 // be removed from the map and the new entry's retransmittable frames will be | 184 // be removed from the map and the new entry's retransmittable frames will be |
| 185 // set to nullptr. | 185 // set to nullptr. |
| 186 UnackedPacketMap unacked_packets_; | 186 UnackedPacketMap unacked_packets_; |
| 187 // The packet at the 0th index of unacked_packets_. | 187 // The packet at the 0th index of unacked_packets_. |
| 188 QuicPacketNumber least_unacked_; | 188 QuicPacketNumber least_unacked_; |
| 189 | 189 |
| 190 QuicByteCount bytes_in_flight_; | 190 QuicByteCount bytes_in_flight_; |
| 191 // Number of retransmittable crypto handshake packets. | 191 // Number of retransmittable crypto handshake packets. |
| 192 size_t pending_crypto_packet_count_; | 192 size_t pending_crypto_packet_count_; |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 194 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 } // namespace net | 197 } // namespace net |
| 198 | 198 |
| 199 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 199 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |