| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SENT_PACKET_MANAGER_H_ | 5 #ifndef NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 6 #define NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <list> | 9 #include <list> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 // Processes the incoming ack. | 94 // Processes the incoming ack. |
| 95 void OnIncomingAck(const ReceivedPacketInfo& received_info, | 95 void OnIncomingAck(const ReceivedPacketInfo& received_info, |
| 96 QuicTime ack_receive_time); | 96 QuicTime ack_receive_time); |
| 97 | 97 |
| 98 // Returns true if the non-FEC packet |sequence_number| is unacked. | 98 // Returns true if the non-FEC packet |sequence_number| is unacked. |
| 99 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; | 99 bool IsUnacked(QuicPacketSequenceNumber sequence_number) const; |
| 100 | 100 |
| 101 // Requests retransmission of all unacked packets of |retransmission_type|. | 101 // Requests retransmission of all unacked packets of |retransmission_type|. |
| 102 void RetransmitUnackedPackets(RetransmissionType retransmission_type); | 102 void RetransmitUnackedPackets(RetransmissionType retransmission_type); |
| 103 | 103 |
| 104 // Retransmits the oldest pending packet there is still a tail loss probe |
| 105 // pending. Invoked after OnRetransmissionTimeout. |
| 106 bool MaybeRetransmitTailLossProbe(); |
| 107 |
| 104 // Removes the retransmittable frames from all unencrypted packets to ensure | 108 // Removes the retransmittable frames from all unencrypted packets to ensure |
| 105 // they don't get retransmitted. | 109 // they don't get retransmitted. |
| 106 void NeuterUnencryptedPackets(); | 110 void NeuterUnencryptedPackets(); |
| 107 | 111 |
| 108 // Returns true if the unacked packet |sequence_number| has retransmittable | 112 // Returns true if the unacked packet |sequence_number| has retransmittable |
| 109 // frames. This will only return false if the packet has been acked, if a | 113 // frames. This will only return false if the packet has been acked, if a |
| 110 // previous transmission of this packet was ACK'd, or if this packet has been | 114 // previous transmission of this packet was ACK'd, or if this packet has been |
| 111 // retransmitted as with different sequence number. | 115 // retransmitted as with different sequence number. |
| 112 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; | 116 bool HasRetransmittableFrames(QuicPacketSequenceNumber sequence_number) const; |
| 113 | 117 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 203 |
| 200 // Process the incoming ack looking for newly ack'd data packets. | 204 // Process the incoming ack looking for newly ack'd data packets. |
| 201 void HandleAckForSentPackets(const ReceivedPacketInfo& received_info); | 205 void HandleAckForSentPackets(const ReceivedPacketInfo& received_info); |
| 202 | 206 |
| 203 // Returns the current retransmission mode. | 207 // Returns the current retransmission mode. |
| 204 RetransmissionTimeoutMode GetRetransmissionMode() const; | 208 RetransmissionTimeoutMode GetRetransmissionMode() const; |
| 205 | 209 |
| 206 // Retransmits all crypto stream packets. | 210 // Retransmits all crypto stream packets. |
| 207 void RetransmitCryptoPackets(); | 211 void RetransmitCryptoPackets(); |
| 208 | 212 |
| 209 // Retransmits the oldest pending packet. | |
| 210 void RetransmitOldestPacket(); | |
| 211 | |
| 212 // Retransmits all the packets and abandons by invoking a full RTO. | 213 // Retransmits all the packets and abandons by invoking a full RTO. |
| 213 void RetransmitAllPackets(); | 214 void RetransmitAllPackets(); |
| 214 | 215 |
| 215 // Returns the timer for retransmitting crypto handshake packets. | 216 // Returns the timer for retransmitting crypto handshake packets. |
| 216 const QuicTime::Delta GetCryptoRetransmissionDelay() const; | 217 const QuicTime::Delta GetCryptoRetransmissionDelay() const; |
| 217 | 218 |
| 218 // Returns the timer for a new tail loss probe. | 219 // Returns the timer for a new tail loss probe. |
| 219 const QuicTime::Delta GetTailLossProbeDelay() const; | 220 const QuicTime::Delta GetTailLossProbeDelay() const; |
| 220 | 221 |
| 221 // Returns the retransmission timeout, after which a full RTO occurs. | 222 // Returns the retransmission timeout, after which a full RTO occurs. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 // Sets of packets acked and lost as a result of the last congestion event. | 306 // Sets of packets acked and lost as a result of the last congestion event. |
| 306 SendAlgorithmInterface::CongestionMap packets_acked_; | 307 SendAlgorithmInterface::CongestionMap packets_acked_; |
| 307 SendAlgorithmInterface::CongestionMap packets_lost_; | 308 SendAlgorithmInterface::CongestionMap packets_lost_; |
| 308 | 309 |
| 309 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); | 310 DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManager); |
| 310 }; | 311 }; |
| 311 | 312 |
| 312 } // namespace net | 313 } // namespace net |
| 313 | 314 |
| 314 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ | 315 #endif // NET_QUIC_QUIC_SENT_PACKET_MANAGER_H_ |
| OLD | NEW |