| 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 "net/base/linked_hash_map.h" | 8 #include "net/base/linked_hash_map.h" |
| 9 #include "net/quic/quic_protocol.h" | 9 #include "net/quic/quic_protocol.h" |
| 10 | 10 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // had any retransmittable packets in the first place. | 45 // had any retransmittable packets in the first place. |
| 46 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; | 46 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; |
| 47 | 47 |
| 48 // Returns true if there are any unacked packets. | 48 // Returns true if there are any unacked packets. |
| 49 bool HasUnackedPackets() const; | 49 bool HasUnackedPackets() const; |
| 50 | 50 |
| 51 // Returns true if there are any unacked packets which have retransmittable | 51 // Returns true if there are any unacked packets which have retransmittable |
| 52 // frames. | 52 // frames. |
| 53 bool HasUnackedRetransmittableFrames() const; | 53 bool HasUnackedRetransmittableFrames() const; |
| 54 | 54 |
| 55 // Returns the number of unacked packets which have retransmittable frames. | |
| 56 size_t GetNumRetransmittablePackets() const; | |
| 57 | |
| 58 // Returns the largest sequence number that has been sent. | 55 // Returns the largest sequence number that has been sent. |
| 59 QuicPacketSequenceNumber largest_sent_packet() const { | 56 QuicPacketSequenceNumber largest_sent_packet() const { |
| 60 return largest_sent_packet_; | 57 return largest_sent_packet_; |
| 61 } | 58 } |
| 62 | 59 |
| 63 // Returns the sum of the bytes in all pending packets. | 60 // Returns the sum of the bytes in all pending packets. |
| 64 QuicByteCount bytes_in_flight() const { | 61 QuicByteCount bytes_in_flight() const { |
| 65 return bytes_in_flight_; | 62 return bytes_in_flight_; |
| 66 } | 63 } |
| 67 | 64 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 size_t bytes_in_flight_; | 142 size_t bytes_in_flight_; |
| 146 // Number of outstanding crypto handshake packets. | 143 // Number of outstanding crypto handshake packets. |
| 147 size_t pending_crypto_packet_count_; | 144 size_t pending_crypto_packet_count_; |
| 148 | 145 |
| 149 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 146 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 150 }; | 147 }; |
| 151 | 148 |
| 152 } // namespace net | 149 } // namespace net |
| 153 | 150 |
| 154 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 151 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |