| 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Sets a packet as sent with the sent time |sent_time|. Marks the packet | 71 // Sets a packet as sent with the sent time |sent_time|. Marks the packet |
| 72 // as in flight if |set_in_flight| is true. | 72 // as in flight if |set_in_flight| is true. |
| 73 // Packets marked as in flight are expected to be marked as missing when they | 73 // Packets marked as in flight are expected to be marked as missing when they |
| 74 // don't arrive, indicating the need for retransmission. | 74 // don't arrive, indicating the need for retransmission. |
| 75 void SetSent(QuicPacketSequenceNumber sequence_number, | 75 void SetSent(QuicPacketSequenceNumber sequence_number, |
| 76 QuicTime sent_time, | 76 QuicTime sent_time, |
| 77 QuicByteCount bytes_sent, | 77 QuicByteCount bytes_sent, |
| 78 bool set_in_flight); | 78 bool set_in_flight); |
| 79 | 79 |
| 80 // Restores the in flight status for a packet that was previously sent. |
| 81 void RestoreInFlight(QuicPacketSequenceNumber sequence_number); |
| 82 |
| 80 // Clears up to |num_to_clear| previous transmissions in order to make room | 83 // Clears up to |num_to_clear| previous transmissions in order to make room |
| 81 // in the ack frame for new acks. | 84 // in the ack frame for new acks. |
| 82 void ClearPreviousRetransmissions(size_t num_to_clear); | 85 void ClearPreviousRetransmissions(size_t num_to_clear); |
| 83 | 86 |
| 84 typedef linked_hash_map<QuicPacketSequenceNumber, | 87 typedef linked_hash_map<QuicPacketSequenceNumber, |
| 85 TransmissionInfo> UnackedPacketMap; | 88 TransmissionInfo> UnackedPacketMap; |
| 86 | 89 |
| 87 typedef UnackedPacketMap::const_iterator const_iterator; | 90 typedef UnackedPacketMap::const_iterator const_iterator; |
| 88 | 91 |
| 89 const_iterator begin() const { return unacked_packets_.begin(); } | 92 const_iterator begin() const { return unacked_packets_.begin(); } |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 size_t bytes_in_flight_; | 146 size_t bytes_in_flight_; |
| 144 // Number of retransmittable crypto handshake packets. | 147 // Number of retransmittable crypto handshake packets. |
| 145 size_t pending_crypto_packet_count_; | 148 size_t pending_crypto_packet_count_; |
| 146 | 149 |
| 147 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); | 150 DISALLOW_COPY_AND_ASSIGN(QuicUnackedPacketMap); |
| 148 }; | 151 }; |
| 149 | 152 |
| 150 } // namespace net | 153 } // namespace net |
| 151 | 154 |
| 152 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ | 155 #endif // NET_QUIC_QUIC_UNACKED_PACKET_MAP_H_ |
| OLD | NEW |