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 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
11 #include <queue> | 11 #include <queue> |
12 #include <set> | 12 #include <set> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/containers/hash_tables.h" | 16 #include "base/containers/hash_tables.h" |
17 #include "net/base/linked_hash_map.h" | 17 #include "net/base/linked_hash_map.h" |
18 #include "net/quic/congestion_control/send_algorithm_interface.h" | 18 #include "net/quic/congestion_control/send_algorithm_interface.h" |
19 #include "net/quic/quic_ack_notifier_manager.h" | 19 #include "net/quic/quic_ack_notifier_manager.h" |
20 #include "net/quic/quic_protocol.h" | 20 #include "net/quic/quic_protocol.h" |
21 | 21 |
22 NET_EXPORT_PRIVATE extern bool FLAGS_track_retransmission_history; | 22 NET_EXPORT_PRIVATE extern bool FLAGS_track_retransmission_history; |
23 NET_EXPORT_PRIVATE extern bool FLAGS_limit_rto_increase_for_tests; | |
24 NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_pacing; | 23 NET_EXPORT_PRIVATE extern bool FLAGS_enable_quic_pacing; |
25 | 24 |
26 namespace net { | 25 namespace net { |
27 | 26 |
28 namespace test { | 27 namespace test { |
29 class QuicConnectionPeer; | 28 class QuicConnectionPeer; |
30 class QuicSentPacketManagerPeer; | 29 class QuicSentPacketManagerPeer; |
31 } // namespace test | 30 } // namespace test |
32 | 31 |
33 class QuicClock; | 32 class QuicClock; |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // the packet |sequence_number|. | 288 // the packet |sequence_number|. |
290 QuicSequenceNumberLength GetSequenceNumberLength( | 289 QuicSequenceNumberLength GetSequenceNumberLength( |
291 QuicPacketSequenceNumber sequence_number) const; | 290 QuicPacketSequenceNumber sequence_number) const; |
292 | 291 |
293 // Clears up to |num_to_clear| previous transmissions in order to make room | 292 // Clears up to |num_to_clear| previous transmissions in order to make room |
294 // in the ack frame for new acks. | 293 // in the ack frame for new acks. |
295 void ClearPreviousRetransmissions(size_t num_to_clear); | 294 void ClearPreviousRetransmissions(size_t num_to_clear); |
296 | 295 |
297 void CleanupPacketHistory(); | 296 void CleanupPacketHistory(); |
298 | 297 |
| 298 // Removes |sequence_number| as a previous transmission of any other packets. |
| 299 void RemovePreviousTransmission(QuicPacketSequenceNumber sequence_number); |
| 300 |
299 // Newly serialized retransmittable and fec packets are added to this map, | 301 // Newly serialized retransmittable and fec packets are added to this map, |
300 // which contains owning pointers to any contained frames. If a packet is | 302 // which contains owning pointers to any contained frames. If a packet is |
301 // retransmitted, this map will contain entries for both the old and the new | 303 // retransmitted, this map will contain entries for both the old and the new |
302 // packet. The old packet's retransmittable frames entry will be NULL, while | 304 // packet. The old packet's retransmittable frames entry will be NULL, while |
303 // the new packet's entry will contain the frames to retransmit. | 305 // the new packet's entry will contain the frames to retransmit. |
304 // If the old packet is acked before the new packet, then the old entry will | 306 // If the old packet is acked before the new packet, then the old entry will |
305 // be removed from the map and the new entry's retransmittable frames will be | 307 // be removed from the map and the new entry's retransmittable frames will be |
306 // set to NULL. | 308 // set to NULL. |
307 UnackedPacketMap unacked_packets_; | 309 UnackedPacketMap unacked_packets_; |
308 | 310 |
(...skipping 29 matching lines...) Expand all Loading... |
338 // Maximum number of tail loss probes to send before firing an RTO. | 340 // Maximum number of tail loss probes to send before firing an RTO. |
339 size_t max_tail_loss_probes_; | 341 size_t max_tail_loss_probes_; |
340 bool using_pacing_; | 342 bool using_pacing_; |
341 | 343 |
342 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 344 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
343 }; | 345 }; |
344 | 346 |
345 } // namespace net | 347 } // namespace net |
346 | 348 |
347 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 349 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
OLD | NEW |