-
Notifications
You must be signed in to change notification settings - Fork 1
/
bbr_drain.h
51 lines (40 loc) · 1.07 KB
/
bbr_drain.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef BBR_DRAIN_H_
#define BBR_DRAIN_H_
#include <vector>
#include <common/rate.h>
#include <time/timestamp.h>
#include <bbr_common.h>
#include <bbr_mode.h>
namespace bbr
{
class BbrAlgorithm;
class BbrModel;
struct BbrCongestionEvent;
class BbrDrainMode
{
public:
BbrDrainMode(BbrAlgorithm* bbr, BbrModel* model);
bool is_probing() const {
return false;
}
size_t cwnd_upper_limit() const;
BbrMode on_congestion_event(
size_t prior_inflight,
time::Timestamp at_time,
const std::vector<AckedPacket>& acked_packets,
const std::vector<LostPacket>& lost_packets,
const BbrCongestionEvent& congestion_event);
void enter(time::Timestamp now,
const BbrCongestionEvent* congestion_event) {};
void leave(time::Timestamp now,
const BbrCongestionEvent* congestion_event) {};
BbrMode on_exit_quiescence(time::Timestamp,
time::Timestamp ) { return BbrMode::DRAIN;}
private:
size_t drain_target() const;
private:
BbrAlgorithm* bbr_;
BbrModel* model_;
};
}
#endif