forked from mindaptiv/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quic_sent_packet_manager_peer.h
106 lines (71 loc) · 3.74 KB
/
quic_sent_packet_manager_peer.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_
#define NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_
#include "base/macros.h"
#include "net/quic/core/quic_packets.h"
#include "net/quic/core/quic_sent_packet_manager.h"
namespace net {
class SendAlgorithmInterface;
namespace test {
class QuicSentPacketManagerPeer {
public:
static size_t GetMaxTailLossProbes(
QuicSentPacketManager* sent_packet_manager);
static void SetMaxTailLossProbes(QuicSentPacketManager* sent_packet_manager,
size_t max_tail_loss_probes);
static bool GetEnableHalfRttTailLossProbe(
QuicSentPacketManager* sent_packet_manager);
static bool GetUseNewRto(QuicSentPacketManager* sent_packet_manager);
static void SetPerspective(QuicSentPacketManager* sent_packet_manager,
Perspective perspective);
static SendAlgorithmInterface* GetSendAlgorithm(
const QuicSentPacketManager& sent_packet_manager);
static void SetSendAlgorithm(QuicSentPacketManager* sent_packet_manager,
SendAlgorithmInterface* send_algorithm);
static const LossDetectionInterface* GetLossAlgorithm(
QuicSentPacketManager* sent_packet_manager);
static void SetLossAlgorithm(QuicSentPacketManager* sent_packet_manager,
LossDetectionInterface* loss_detector);
static bool HasPendingPackets(
const QuicSentPacketManager* sent_packet_manager);
// Returns true if |packet_number| is a retransmission of a packet.
static bool IsRetransmission(QuicSentPacketManager* sent_packet_manager,
QuicPacketNumber packet_number);
static void MarkForRetransmission(QuicSentPacketManager* sent_packet_manager,
QuicPacketNumber packet_number,
TransmissionType transmission_type);
static QuicTime::Delta GetRetransmissionDelay(
const QuicSentPacketManager* sent_packet_manager);
static bool HasUnackedCryptoPackets(
const QuicSentPacketManager* sent_packet_manager);
static size_t GetNumRetransmittablePackets(
const QuicSentPacketManager* sent_packet_manager);
static QuicByteCount GetBytesInFlight(
const QuicSentPacketManager* sent_packet_manager);
static void SetConsecutiveRtoCount(QuicSentPacketManager* sent_packet_manager,
size_t count);
static void SetConsecutiveTlpCount(QuicSentPacketManager* sent_packet_manager,
size_t count);
static QuicSustainedBandwidthRecorder& GetBandwidthRecorder(
QuicSentPacketManager* sent_packet_manager);
static void SetUsingPacing(QuicSentPacketManager* sent_packet_manager,
bool using_pacing);
static bool UsingPacing(const QuicSentPacketManager* sent_packet_manager);
static bool IsUnacked(QuicSentPacketManager* sent_packet_manager,
QuicPacketNumber packet_number);
static bool HasRetransmittableFrames(
QuicSentPacketManager* sent_packet_manager,
QuicPacketNumber packet_number);
static QuicUnackedPacketMap* GetUnackedPacketMap(
QuicSentPacketManager* sent_packet_manager);
static void DisablePacerBursts(QuicSentPacketManager* sent_packet_manager);
static void SetNextPacedPacketTime(QuicSentPacketManager* sent_packet_manager,
QuicTime time);
private:
DISALLOW_COPY_AND_ASSIGN(QuicSentPacketManagerPeer);
};
} // namespace test
} // namespace net
#endif // NET_QUIC_TEST_TOOLS_QUIC_SENT_PACKET_MANAGER_PEER_H_