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 // Class that handle the initial probing phase of inter arrival congestion | 5 // Class that handle the initial probing phase of inter arrival congestion |
6 // control. | 6 // control. |
7 #ifndef NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ | 7 #ifndef NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ |
8 #define NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ | 8 #define NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "net/base/net_export.h" | 12 #include "net/base/net_export.h" |
13 #include "net/quic/congestion_control/available_channel_estimator.h" | 13 #include "net/quic/congestion_control/available_channel_estimator.h" |
14 #include "net/quic/quic_bandwidth.h" | 14 #include "net/quic/quic_bandwidth.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
17 | 17 |
18 class NET_EXPORT_PRIVATE InterArrivalProbe { | 18 class NET_EXPORT_PRIVATE InterArrivalProbe { |
19 public: | 19 public: |
20 explicit InterArrivalProbe(QuicByteCount max_segment_size); | 20 explicit InterArrivalProbe(QuicByteCount max_segment_size); |
21 ~InterArrivalProbe(); | 21 ~InterArrivalProbe(); |
22 | 22 |
23 void set_max_segment_size(QuicByteCount max_segment_size); | |
24 | |
25 // Call every time a packet is sent to the network. | 23 // Call every time a packet is sent to the network. |
26 void OnPacketSent(QuicByteCount bytes); | 24 void OnPacketSent(QuicByteCount bytes); |
27 | 25 |
28 // Call once for each sent packet that we receive an acknowledgement from | 26 // Call once for each sent packet that we receive an acknowledgement from |
29 // the peer for. | 27 // the peer for. |
30 void OnAcknowledgedPacket(QuicByteCount bytes); | 28 void OnAcknowledgedPacket(QuicByteCount bytes); |
31 | 29 |
32 // Called when the RTO fires, and all packets have been lost. | 30 // Called when the RTO fires, and all packets have been lost. |
33 void OnRetransmissionTimeout(); | 31 void OnRetransmissionTimeout(); |
34 | 32 |
(...skipping 20 matching lines...) Expand all Loading... |
55 QuicPacketSequenceNumber first_sequence_number_; | 53 QuicPacketSequenceNumber first_sequence_number_; |
56 bool estimate_available_; | 54 bool estimate_available_; |
57 QuicBandwidth available_channel_estimate_; | 55 QuicBandwidth available_channel_estimate_; |
58 QuicByteCount unacked_data_; | 56 QuicByteCount unacked_data_; |
59 | 57 |
60 DISALLOW_COPY_AND_ASSIGN(InterArrivalProbe); | 58 DISALLOW_COPY_AND_ASSIGN(InterArrivalProbe); |
61 }; | 59 }; |
62 | 60 |
63 } // namespace net | 61 } // namespace net |
64 #endif // NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ | 62 #endif // NET_QUIC_CONGESTION_CONTROL_INTER_ARRIVAL_PROBE_H_ |
OLD | NEW |