| 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 // Returns true if there are any unacked packets which have retransmittable | 53 // Returns true if there are any unacked packets which have retransmittable |
| 54 // frames. | 54 // frames. |
| 55 bool HasUnackedRetransmittableFrames() const; | 55 bool HasUnackedRetransmittableFrames() const; |
| 56 | 56 |
| 57 // Returns the largest sequence number that has been sent. | 57 // Returns the largest sequence number that has been sent. |
| 58 QuicPacketSequenceNumber largest_sent_packet() const { | 58 QuicPacketSequenceNumber largest_sent_packet() const { |
| 59 return largest_sent_packet_; | 59 return largest_sent_packet_; |
| 60 } | 60 } |
| 61 | 61 |
| 62 // Returns the largest sequence number that has been acked. |
| 63 QuicPacketSequenceNumber largest_observed() const { |
| 64 return largest_observed_; |
| 65 } |
| 66 |
| 62 // Returns the sum of bytes from all packets in flight. | 67 // Returns the sum of bytes from all packets in flight. |
| 63 QuicByteCount bytes_in_flight() const { | 68 QuicByteCount bytes_in_flight() const { |
| 64 return bytes_in_flight_; | 69 return bytes_in_flight_; |
| 65 } | 70 } |
| 66 | 71 |
| 67 // Returns the smallest sequence number of a serialized packet which has not | 72 // Returns the smallest sequence number of a serialized packet which has not |
| 68 // been acked by the peer. If there are no unacked packets, returns 0. | 73 // been acked by the peer. If there are no unacked packets, returns 0. |
| 69 QuicPacketSequenceNumber GetLeastUnackedSentPacket() const; | 74 QuicPacketSequenceNumber GetLeastUnackedSentPacket() const; |
| 70 | 75 |
| 71 // Sets a packet as sent with the sent time |sent_time|. Marks the packet | 76 // Sets a packet as sent with the sent time |sent_time|. Marks the packet |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 size_t bytes_in_flight_; | 151 size_t bytes_in_flight_; |
| 147 // Number of retransmittable crypto handshake packets. | 152 // Number of retransmittable crypto handshake packets. |
| 148 size_t pending_crypto_packet_count_; | 153 size_t pending_crypto_packet_count_; |
| 149 | 154 |
| 150 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 155 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 151 }; | 156 }; |
| 152 | 157 |
| 153 } // namespace net | 158 } // namespace net |
| 154 | 159 |
| 155 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 160 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |