blob: 07658e59c22af3bdba740ab65f3246a8303f81c6 (
plain)
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
|
// Copyright (c) 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.
#include "net/quic/test_tools/quic_packet_creator_peer.h"
#include "net/quic/quic_packet_creator.h"
namespace net {
namespace test {
// static
bool QuicPacketCreatorPeer::SendVersionInPacket(QuicPacketCreator* creator) {
return creator->send_version_in_packet_;
}
// static
void QuicPacketCreatorPeer::SetSendVersionInPacket(
QuicPacketCreator* creator, bool send_version_in_packet) {
creator->send_version_in_packet_ = send_version_in_packet;
}
// static
void QuicPacketCreatorPeer::SetSequenceNumberLength(
QuicPacketCreator* creator,
QuicSequenceNumberLength sequence_number_length) {
creator->sequence_number_length_ = sequence_number_length;
}
// static
QuicSequenceNumberLength QuicPacketCreatorPeer::GetSequenceNumberLength(
QuicPacketCreator* creator) {
return creator->sequence_number_length_;
}
// static
void QuicPacketCreatorPeer::SetIsServer(QuicPacketCreator* creator,
bool is_server) {
creator->is_server_ = is_server;
}
// static
bool QuicPacketCreatorPeer::SwitchFecProtectionOn(
QuicPacketCreator* creator, size_t max_packets_per_fec_group) {
creator->set_max_packets_per_fec_group(max_packets_per_fec_group);
creator->StartFecProtectingPackets();
return creator->IsFecProtected();
}
} // namespace test
} // namespace net
|