summaryrefslogtreecommitdiffstats
path: root/net/quic/test_tools/quic_packet_creator_peer.cc
blob: 1acdf244f2ff9a63d0db4990aba1d1f7bb811c48 (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
// 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;
}

}  // namespace test
}  // namespace net