| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // The pure virtual class for send side congestion control algorithm. | 5 // The pure virtual class for send side congestion control algorithm. |
| 6 | 6 |
| 7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
| 8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 static SendAlgorithmInterface* Create(const QuicClock* clock, | 39 static SendAlgorithmInterface* Create(const QuicClock* clock, |
| 40 CongestionFeedbackType type); | 40 CongestionFeedbackType type); |
| 41 | 41 |
| 42 virtual ~SendAlgorithmInterface() {} | 42 virtual ~SendAlgorithmInterface() {} |
| 43 | 43 |
| 44 // Called when we receive congestion feedback from remote peer. | 44 // Called when we receive congestion feedback from remote peer. |
| 45 virtual void OnIncomingQuicCongestionFeedbackFrame( | 45 virtual void OnIncomingQuicCongestionFeedbackFrame( |
| 46 const QuicCongestionFeedbackFrame& feedback, | 46 const QuicCongestionFeedbackFrame& feedback, |
| 47 QuicTime feedback_receive_time, | 47 QuicTime feedback_receive_time, |
| 48 QuicBandwidth sent_bandwidth, | |
| 49 const SentPacketsMap& sent_packets) = 0; | 48 const SentPacketsMap& sent_packets) = 0; |
| 50 | 49 |
| 51 // Called for each received ACK, with sequence number from remote peer. | 50 // Called for each received ACK, with sequence number from remote peer. |
| 52 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, | 51 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, |
| 53 QuicByteCount acked_bytes, | 52 QuicByteCount acked_bytes, |
| 54 QuicTime::Delta rtt) = 0; | 53 QuicTime::Delta rtt) = 0; |
| 55 | 54 |
| 56 virtual void OnIncomingLoss(QuicTime ack_receive_time) = 0; | 55 virtual void OnIncomingLoss(QuicTime ack_receive_time) = 0; |
| 57 | 56 |
| 58 // Inform that we sent x bytes to the wire, and if that was a retransmission. | 57 // Inform that we sent x bytes to the wire, and if that was a retransmission. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 76 // Returns 0 when it does not have an estimate. | 75 // Returns 0 when it does not have an estimate. |
| 77 virtual QuicBandwidth BandwidthEstimate() = 0; | 76 virtual QuicBandwidth BandwidthEstimate() = 0; |
| 78 | 77 |
| 79 // TODO(satyamshekhar): Monitor MinRtt. | 78 // TODO(satyamshekhar): Monitor MinRtt. |
| 80 virtual QuicTime::Delta SmoothedRtt() = 0; | 79 virtual QuicTime::Delta SmoothedRtt() = 0; |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace net | 82 } // namespace net |
| 84 | 83 |
| 85 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ | 84 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ |
| OLD | NEW |