| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // the queue. It is undefined behavior to call this with |higher| < |lower|. | 45 // the queue. It is undefined behavior to call this with |higher| < |lower|. |
| 46 void Remove(QuicPacketNumber lower, QuicPacketNumber higher); | 46 void Remove(QuicPacketNumber lower, QuicPacketNumber higher); |
| 47 | 47 |
| 48 // Removes packets with values less than |higher| from the set of packets in | 48 // Removes packets with values less than |higher| from the set of packets in |
| 49 // the queue. Returns true if packets were removed. | 49 // the queue. Returns true if packets were removed. |
| 50 bool RemoveUpTo(QuicPacketNumber higher); | 50 bool RemoveUpTo(QuicPacketNumber higher); |
| 51 | 51 |
| 52 // Removes the smallest interval in the queue. | 52 // Removes the smallest interval in the queue. |
| 53 void RemoveSmallestInterval(); | 53 void RemoveSmallestInterval(); |
| 54 | 54 |
| 55 // Mutates packet number set so that it contains only those packet numbers | |
| 56 // from minimum to maximum packet number not currently in the set. Do nothing | |
| 57 // if packet number set is empty. | |
| 58 void Complement(); | |
| 59 | |
| 60 // Returns true if the queue contains |packet_number|. | 55 // Returns true if the queue contains |packet_number|. |
| 61 bool Contains(QuicPacketNumber packet_number) const; | 56 bool Contains(QuicPacketNumber packet_number) const; |
| 62 | 57 |
| 63 // Returns true if the queue is empty. | 58 // Returns true if the queue is empty. |
| 64 bool Empty() const; | 59 bool Empty() const; |
| 65 | 60 |
| 66 // Returns the minimum packet number stored in the queue. It is undefined | 61 // Returns the minimum packet number stored in the queue. It is undefined |
| 67 // behavior to call this if the queue is empty. | 62 // behavior to call this if the queue is empty. |
| 68 QuicPacketNumber Min() const; | 63 QuicPacketNumber Min() const; |
| 69 | 64 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // as missing. | 118 // as missing. |
| 124 // Always returns false for packet numbers less than least_unacked. | 119 // Always returns false for packet numbers less than least_unacked. |
| 125 QUIC_EXPORT_PRIVATE bool IsAwaitingPacket( | 120 QUIC_EXPORT_PRIVATE bool IsAwaitingPacket( |
| 126 const QuicAckFrame& ack_frame, | 121 const QuicAckFrame& ack_frame, |
| 127 QuicPacketNumber packet_number, | 122 QuicPacketNumber packet_number, |
| 128 QuicPacketNumber peer_least_packet_awaiting_ack); | 123 QuicPacketNumber peer_least_packet_awaiting_ack); |
| 129 | 124 |
| 130 } // namespace net | 125 } // namespace net |
| 131 | 126 |
| 132 #endif // NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ | 127 #endif // NET_QUIC_CORE_FRAMES_QUIC_ACK_FRAME_H_ |
| OLD | NEW |