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

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

Issue 2193073003: Move shared files in net/quic/ into net/quic/core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: io_thread_unittest.cc Created 4 years, 4 months 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
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 //
5 // Implements Proportional Rate Reduction (PRR) per RFC 6937.
6
7 #ifndef NET_QUIC_CONGESTION_CONTROL_PRR_SENDER_H_
8 #define NET_QUIC_CONGESTION_CONTROL_PRR_SENDER_H_
9
10 #include <stddef.h>
11
12 #include "net/quic/quic_bandwidth.h"
13 #include "net/quic/quic_time.h"
14
15 namespace net {
16
17 class NET_EXPORT_PRIVATE PrrSender {
18 public:
19 PrrSender();
20 // OnPacketLost should be called on the first loss that triggers a recovery
21 // period and all other methods in this class should only be called when in
22 // recovery.
23 void OnPacketLost(QuicByteCount bytes_in_flight);
24 void OnPacketSent(QuicByteCount sent_bytes);
25 void OnPacketAcked(QuicByteCount acked_bytes);
26 QuicTime::Delta TimeUntilSend(QuicByteCount congestion_window,
27 QuicByteCount bytes_in_flight,
28 QuicByteCount slowstart_threshold) const;
29
30 private:
31 // Bytes sent and acked since the last loss event.
32 // |bytes_sent_since_loss_| is the same as "prr_out_" in RFC 6937,
33 // and |bytes_delivered_since_loss_| is the same as "prr_delivered_".
34 QuicByteCount bytes_sent_since_loss_;
35 QuicByteCount bytes_delivered_since_loss_;
36 size_t ack_count_since_loss_;
37
38 // The congestion window before the last loss event.
39 QuicByteCount bytes_in_flight_before_loss_;
40 };
41
42 } // namespace net
43
44 #endif // NET_QUIC_CONGESTION_CONTROL_PRR_SENDER_H_
OLDNEW
« no previous file with comments | « net/quic/congestion_control/pacing_sender_test.cc ('k') | net/quic/congestion_control/prr_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698