QUICHE team | a6ef0a6 | 2019-03-07 20:34:33 -0500 | [diff] [blame] | 1 | // Copyright (c) 2013 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 | #include "net/third_party/quiche/src/quic/test_tools/quic_client_peer.h" |
| 6 | |
| 7 | #include "net/third_party/quiche/src/quic/tools/quic_client.h" |
| 8 | |
| 9 | namespace quic { |
| 10 | namespace test { |
| 11 | |
| 12 | // static |
| 13 | bool QuicClientPeer::CreateUDPSocketAndBind(QuicClient* client) { |
| 14 | return client->network_helper()->CreateUDPSocketAndBind( |
| 15 | client->server_address(), client->bind_to_address(), |
| 16 | client->local_port()); |
| 17 | } |
| 18 | |
| 19 | // static |
| 20 | void QuicClientPeer::CleanUpUDPSocket(QuicClient* client, int fd) { |
| 21 | client->epoll_network_helper()->CleanUpUDPSocket(fd); |
| 22 | } |
| 23 | |
| 24 | // static |
| 25 | void QuicClientPeer::SetClientPort(QuicClient* client, int port) { |
| 26 | client->epoll_network_helper()->SetClientPort(port); |
| 27 | } |
| 28 | |
| 29 | // static |
| 30 | void QuicClientPeer::SetWriter(QuicClient* client, QuicPacketWriter* writer) { |
| 31 | client->set_writer(writer); |
| 32 | } |
| 33 | |
| 34 | } // namespace test |
| 35 | } // namespace quic |