OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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_CORE_FRAMES_QUIC_ACK_FRAME_H_ | 5 #ifndef NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ |
6 #define NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ | 6 #define NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ |
7 | 7 |
8 #include <ostream> | 8 #include <ostream> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 20 matching lines...) Expand all Loading... |
31 PacketNumberQueue& operator=(const PacketNumberQueue& other); | 31 PacketNumberQueue& operator=(const PacketNumberQueue& other); |
32 PacketNumberQueue& operator=(PacketNumberQueue&& other); | 32 PacketNumberQueue& operator=(PacketNumberQueue&& other); |
33 | 33 |
34 // Adds |packet_number| to the set of packets in the queue. | 34 // Adds |packet_number| to the set of packets in the queue. |
35 void Add(QuicPacketNumber packet_number); | 35 void Add(QuicPacketNumber packet_number); |
36 | 36 |
37 // Adds packets between [lower, higher) to the set of packets in the queue. It | 37 // Adds packets between [lower, higher) to the set of packets in the queue. It |
38 // is undefined behavior to call this with |higher| < |lower|. | 38 // is undefined behavior to call this with |higher| < |lower|. |
39 void Add(QuicPacketNumber lower, QuicPacketNumber higher); | 39 void Add(QuicPacketNumber lower, QuicPacketNumber higher); |
40 | 40 |
41 // Removes |packet_number| from the set of packets in the queue. | |
42 void Remove(QuicPacketNumber packet_number); | |
43 | |
44 // Removes packets numbers between [lower, higher) to the set of packets in | |
45 // the queue. It is undefined behavior to call this with |higher| < |lower|. | |
46 void Remove(QuicPacketNumber lower, QuicPacketNumber higher); | |
47 | |
48 // Removes packets with values less than |higher| from the set of packets in | 41 // Removes packets with values less than |higher| from the set of packets in |
49 // the queue. Returns true if packets were removed. | 42 // the queue. Returns true if packets were removed. |
50 bool RemoveUpTo(QuicPacketNumber higher); | 43 bool RemoveUpTo(QuicPacketNumber higher); |
51 | 44 |
52 // Removes the smallest interval in the queue. | 45 // Removes the smallest interval in the queue. |
53 void RemoveSmallestInterval(); | 46 void RemoveSmallestInterval(); |
54 | 47 |
55 // Returns true if the queue contains |packet_number|. | 48 // Returns true if the queue contains |packet_number|. |
56 bool Contains(QuicPacketNumber packet_number) const; | 49 bool Contains(QuicPacketNumber packet_number) const; |
57 | 50 |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // as missing. | 110 // as missing. |
118 // Always returns false for packet numbers less than least_unacked. | 111 // Always returns false for packet numbers less than least_unacked. |
119 QUIC_EXPORT_PRIVATE bool IsAwaitingPacket( | 112 QUIC_EXPORT_PRIVATE bool IsAwaitingPacket( |
120 const QuicAckFrame& ack_frame, | 113 const QuicAckFrame& ack_frame, |
121 QuicPacketNumber packet_number, | 114 QuicPacketNumber packet_number, |
122 QuicPacketNumber peer_least_packet_awaiting_ack); | 115 QuicPacketNumber peer_least_packet_awaiting_ack); |
123 | 116 |
124 } // namespace net | 117 } // namespace net |
125 | 118 |
126 #endif // NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ | 119 #endif // NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ |
OLD | NEW |