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_ACK_NOTIFIER_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
6 #define NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ | 6 #define NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <map> | 9 #include <map> |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 // Called when the connection receives a new AckFrame. If |sequence_number| | 29 // Called when the connection receives a new AckFrame. If |sequence_number| |
30 // exists in ack_notifier_map_ then the corresponding AckNotifiers will have | 30 // exists in ack_notifier_map_ then the corresponding AckNotifiers will have |
31 // their OnAck method called. | 31 // their OnAck method called. |
32 void OnPacketAcked(QuicPacketSequenceNumber sequence_number, | 32 void OnPacketAcked(QuicPacketSequenceNumber sequence_number, |
33 QuicTime::Delta delta_largest_observed); | 33 QuicTime::Delta delta_largest_observed); |
34 | 34 |
35 // If a packet has been retransmitted with a new sequence number, then this | 35 // If a packet has been retransmitted with a new sequence number, then this |
36 // will be called. It updates the mapping in ack_notifier_map_, and also | 36 // will be called. It updates the mapping in ack_notifier_map_, and also |
37 // updates the internal set of sequence numbers in each matching AckNotifier. | 37 // updates the internal set of sequence numbers in each matching AckNotifier. |
38 void UpdateSequenceNumber(QuicPacketSequenceNumber old_sequence_number, | 38 void OnPacketRetransmitted(QuicPacketSequenceNumber old_sequence_number, |
39 QuicPacketSequenceNumber new_sequence_number); | 39 QuicPacketSequenceNumber new_sequence_number, |
| 40 int packet_payload_size); |
40 | 41 |
41 // This is called after a packet has been serialized, is ready to be sent, and | 42 // This is called after a packet has been serialized, is ready to be sent, and |
42 // contains retransmittable frames (which may have associated AckNotifiers). | 43 // contains retransmittable frames (which may have associated AckNotifiers). |
43 // If any of the retransmittable frames included in |serialized_packet| have | 44 // If any of the retransmittable frames included in |serialized_packet| have |
44 // AckNotifiers registered, then add them to our internal map and additionally | 45 // AckNotifiers registered, then add them to our internal map and additionally |
45 // inform the AckNotifier of the sequence number which it should track. | 46 // inform the AckNotifier of the sequence number which it should track. |
46 void OnSerializedPacket(const SerializedPacket& serialized_packet); | 47 void OnSerializedPacket(const SerializedPacket& serialized_packet); |
47 | 48 |
48 private: | 49 private: |
49 typedef std::list<QuicAckNotifier*> AckNotifierList; | 50 typedef std::list<QuicAckNotifier*> AckNotifierList; |
(...skipping 14 matching lines...) Expand all Loading... |
64 // number, call OnAck for all mapped AckNotifiers. | 65 // number, call OnAck for all mapped AckNotifiers. |
65 // Does not own the AckNotifiers. | 66 // Does not own the AckNotifiers. |
66 AckNotifierMap ack_notifier_map_; | 67 AckNotifierMap ack_notifier_map_; |
67 | 68 |
68 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager); | 69 DISALLOW_COPY_AND_ASSIGN(AckNotifierManager); |
69 }; | 70 }; |
70 | 71 |
71 } // namespace net | 72 } // namespace net |
72 | 73 |
73 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ | 74 #endif // NET_QUIC_QUIC_ACK_NOTIFIER_MANAGER_H_ |
OLD | NEW |