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 <deque> | 8 #include <deque> |
9 | 9 |
10 #include "net/quic/quic_protocol.h" | 10 #include "net/quic/quic_protocol.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; | 37 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; |
38 | 38 |
39 // Sets the nack count to the max of the current nack count and |min_nacks|. | 39 // Sets the nack count to the max of the current nack count and |min_nacks|. |
40 void NackPacket(QuicPacketSequenceNumber sequence_number, | 40 void NackPacket(QuicPacketSequenceNumber sequence_number, |
41 QuicPacketCount min_nacks); | 41 QuicPacketCount min_nacks); |
42 | 42 |
43 // Marks |sequence_number| as no longer in flight. | 43 // Marks |sequence_number| as no longer in flight. |
44 void RemoveFromInFlight(QuicPacketSequenceNumber sequence_number); | 44 void RemoveFromInFlight(QuicPacketSequenceNumber sequence_number); |
45 | 45 |
46 // No longer retransmit data for |stream_id|. | 46 // No longer retransmit data for |stream_id|. |
47 void StopRetransmissionForStream(QuicStreamId stream_id); | 47 void CancelRetransmissionsForStream(QuicStreamId stream_id); |
48 | 48 |
49 // Returns true if the unacked packet |sequence_number| has retransmittable | 49 // Returns true if the unacked packet |sequence_number| has retransmittable |
50 // frames. This will return false if the packet has been acked, if a | 50 // frames. This will return false if the packet has been acked, if a |
51 // previous transmission of this packet was ACK'd, or if this packet has been | 51 // previous transmission of this packet was ACK'd, or if this packet has been |
52 // retransmitted as with different sequence number, or if the packet never | 52 // retransmitted as with different sequence number, or if the packet never |
53 // had any retransmittable packets in the first place. | 53 // had any retransmittable packets in the first place. |
54 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; | 54 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; |
55 | 55 |
56 // Returns true if there are any unacked packets. | 56 // Returns true if there are any unacked packets. |
57 bool HasUnackedPackets() const; | 57 bool HasUnackedPackets() const; |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 QuicByteCount bytes_in_flight_; | 176 QuicByteCount bytes_in_flight_; |
177 // Number of retransmittable crypto handshake packets. | 177 // Number of retransmittable crypto handshake packets. |
178 size_t pending_crypto_packet_count_; | 178 size_t pending_crypto_packet_count_; |
179 | 179 |
180 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 180 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
181 }; | 181 }; |
182 | 182 |
183 } // namespace net | 183 } // namespace net |
184 | 184 |
185 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 185 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
OLD | NEW |