| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 5 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 6 // Use of this source code is governed by a BSD-style license that can be | 6 // Use of this source code is governed by a BSD-style license that can be |
| 7 // found in the LICENSE file. | 7 // found in the LICENSE file. |
| 8 // | 8 // |
| 9 // This is the interface from the QuicConnection into the QUIC | 9 // This is the interface from the QuicConnection into the QUIC |
| 10 // congestion control code. It wraps the SendAlgorithmInterface and | 10 // congestion control code. It wraps the SendAlgorithmInterface and |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 // Called when a congestion feedback frame is received from peer. | 43 // Called when a congestion feedback frame is received from peer. |
| 44 virtual void OnIncomingQuicCongestionFeedbackFrame( | 44 virtual void OnIncomingQuicCongestionFeedbackFrame( |
| 45 const QuicCongestionFeedbackFrame& frame, | 45 const QuicCongestionFeedbackFrame& frame, |
| 46 QuicTime feedback_receive_time); | 46 QuicTime feedback_receive_time); |
| 47 | 47 |
| 48 // Called when we have sent bytes to the peer. This informs the manager both | 48 // Called when we have sent bytes to the peer. This informs the manager both |
| 49 // the number of bytes sent and if they were retransmitted. | 49 // the number of bytes sent and if they were retransmitted. |
| 50 virtual void SentPacket(QuicPacketSequenceNumber sequence_number, | 50 virtual void SentPacket(QuicPacketSequenceNumber sequence_number, |
| 51 QuicTime sent_time, | 51 QuicTime sent_time, |
| 52 QuicByteCount bytes, | 52 QuicByteCount bytes, |
| 53 Retransmission retransmission); | 53 Retransmission retransmission, |
| 54 HasRetransmittableData has_retransmittable_data); |
| 54 | 55 |
| 55 // Called when a packet is timed out. | 56 // Called when a packet is timed out. |
| 56 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number); | 57 virtual void AbandoningPacket(QuicPacketSequenceNumber sequence_number); |
| 57 | 58 |
| 58 // Calculate the time until we can send the next packet to the wire. | 59 // Calculate the time until we can send the next packet to the wire. |
| 59 // Note 1: When kUnknownWaitTime is returned, there is no need to poll | 60 // Note 1: When kUnknownWaitTime is returned, there is no need to poll |
| 60 // TimeUntilSend again until we receive an OnIncomingAckFrame event. | 61 // TimeUntilSend again until we receive an OnIncomingAckFrame event. |
| 61 // Note 2: Send algorithms may or may not use |retransmit| in their | 62 // Note 2: Send algorithms may or may not use |retransmit| in their |
| 62 // calculations. | 63 // calculations. |
| 63 virtual QuicTime::Delta TimeUntilSend(QuicTime now, | 64 virtual QuicTime::Delta TimeUntilSend(QuicTime now, |
| (...skipping 14 matching lines...) Expand all Loading... |
| 78 // timestamp: the arrival time of the packet. | 79 // timestamp: the arrival time of the packet. |
| 79 // revived: true if the packet was lost and then recovered with help of a | 80 // revived: true if the packet was lost and then recovered with help of a |
| 80 // FEC packet. | 81 // FEC packet. |
| 81 virtual void RecordIncomingPacket(QuicByteCount bytes, | 82 virtual void RecordIncomingPacket(QuicByteCount bytes, |
| 82 QuicPacketSequenceNumber sequence_number, | 83 QuicPacketSequenceNumber sequence_number, |
| 83 QuicTime timestamp, | 84 QuicTime timestamp, |
| 84 bool revived); | 85 bool revived); |
| 85 | 86 |
| 86 const QuicTime::Delta DefaultRetransmissionTime(); | 87 const QuicTime::Delta DefaultRetransmissionTime(); |
| 87 | 88 |
| 89 // Returns amount of time for delayed ack timer. |
| 90 const QuicTime::Delta DelayedAckTime(); |
| 91 |
| 88 const QuicTime::Delta GetRetransmissionDelay( | 92 const QuicTime::Delta GetRetransmissionDelay( |
| 89 size_t unacked_packets_count, | 93 size_t unacked_packets_count, |
| 90 size_t number_retransmissions); | 94 size_t number_retransmissions); |
| 91 | 95 |
| 92 // Returns the estimated smoothed RTT calculated by the congestion algorithm. | 96 // Returns the estimated smoothed RTT calculated by the congestion algorithm. |
| 93 const QuicTime::Delta SmoothedRtt(); | 97 const QuicTime::Delta SmoothedRtt(); |
| 94 | 98 |
| 95 // Returns the estimated bandwidth calculated by the congestion algorithm. | 99 // Returns the estimated bandwidth calculated by the congestion algorithm. |
| 96 QuicBandwidth BandwidthEstimate(); | 100 QuicBandwidth BandwidthEstimate(); |
| 97 | 101 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 112 PendingPacketsMap pending_packets_; | 116 PendingPacketsMap pending_packets_; |
| 113 QuicPacketSequenceNumber largest_missing_; | 117 QuicPacketSequenceNumber largest_missing_; |
| 114 QuicTime::Delta current_rtt_; | 118 QuicTime::Delta current_rtt_; |
| 115 | 119 |
| 116 DISALLOW_COPY_AND_ASSIGN(QuicCongestionManager); | 120 DISALLOW_COPY_AND_ASSIGN(QuicCongestionManager); |
| 117 }; | 121 }; |
| 118 | 122 |
| 119 } // namespace net | 123 } // namespace net |
| 120 | 124 |
| 121 #endif // NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_ | 125 #endif // NET_QUIC_CONGESTION_CONTROL_QUIC_CONGESTION_MANAGER_H_ |
| OLD | NEW |