Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: net/quic/congestion_control/send_algorithm_interface.h

Issue 11377096: Change from re-transmitting an packet with a retransmit number to sending a new packet with a new s… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | net/quic/quic_connection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 virtual void OnIncomingCongestionInfo( 28 virtual void OnIncomingCongestionInfo(
29 const CongestionInfo& congestion_info) = 0; 29 const CongestionInfo& congestion_info) = 0;
30 30
31 // Called for each received ACK, with sequence number from remote peer. 31 // Called for each received ACK, with sequence number from remote peer.
32 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number, 32 virtual void OnIncomingAck(QuicPacketSequenceNumber acked_sequence_number,
33 size_t acked_bytes, 33 size_t acked_bytes,
34 uint64 rtt_us) = 0; 34 uint64 rtt_us) = 0;
35 35
36 virtual void OnIncomingLoss(int number_of_lost_packets) = 0; 36 virtual void OnIncomingLoss(int number_of_lost_packets) = 0;
37 37
38 // Inform that we sent x bytest to the wire, and if that was a retransmission. 38 // Inform that we sent x bytes to the wire, and if that was a retransmission.
39 // Note: this function must be called for every packet sent to the wire. 39 // Note: this function must be called for every packet sent to the wire.
40 virtual void SentPacket(QuicPacketSequenceNumber sequence_number, 40 virtual void SentPacket(QuicPacketSequenceNumber sequence_number,
41 size_t bytes, 41 size_t bytes,
42 bool retransmit) = 0; 42 bool retransmit) = 0;
43 43
44 // Calculate the time until we can send the next packet. 44 // Calculate the time until we can send the next packet.
45 // Usage: When this returns 0, CongestionWindow returns the number of bytes 45 // Usage: When this returns 0, CongestionWindow returns the number of bytes
46 // of the congestion window. 46 // of the congestion window.
47 virtual int TimeUntilSend(bool retransmit) = 0; 47 virtual int TimeUntilSend(bool retransmit) = 0;
48 48
49 // The current available congestion window in bytes. 49 // The current available congestion window in bytes.
50 virtual size_t AvailableCongestionWindow() = 0; 50 virtual size_t AvailableCongestionWindow() = 0;
51 51
52 // What's the current estimated bandwidth in bytes per second. 52 // What's the current estimated bandwidth in bytes per second.
53 // Returns KNoValidEstimate when it does not have an estimate. 53 // Returns KNoValidEstimate when it does not have an estimate.
54 virtual int BandwidthEstimate() = 0; 54 virtual int BandwidthEstimate() = 0;
55 }; 55 };
56 56
57 } // namespace net 57 } // namespace net
58 58
59 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_ 59 #endif // NET_QUIC_CONGESTION_CONTROL_SEND_ALGORITHM_INTERFACE_H_
OLDNEW
« no previous file with comments | « no previous file | net/quic/quic_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698