| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/tools/quic/test_tools/quic_client_peer.h" | 5 #include "net/tools/quic/test_tools/quic_client_peer.h" |
| 6 | 6 |
| 7 #include "net/tools/quic/quic_client.h" | 7 #include "net/tools/quic/quic_client.h" |
| 8 | 8 |
| 9 namespace net { | 9 namespace net { |
| 10 namespace tools { | 10 namespace tools { |
| 11 namespace test { | 11 namespace test { |
| 12 | 12 |
| 13 // static | 13 // static |
| 14 QuicCryptoClientConfig* QuicClientPeer::GetCryptoConfig(QuicClient* client) { | 14 QuicCryptoClientConfig* QuicClientPeer::GetCryptoConfig(QuicClient* client) { |
| 15 return &client->crypto_config_; | 15 return &client->crypto_config_; |
| 16 } | 16 } |
| 17 | 17 |
| 18 // static | 18 // static |
| 19 bool QuicClientPeer::CreateUDPSocket(QuicClient* client) { | 19 bool QuicClientPeer::CreateUDPSocket(QuicClient* client) { |
| 20 return client->CreateUDPSocket(); | 20 return client->CreateUDPSocket(); |
| 21 } | 21 } |
| 22 | 22 |
| 23 // static | 23 // static |
| 24 void QuicClientPeer::SetClientPort(QuicClient* client, int port) { | 24 void QuicClientPeer::SetClientPort(QuicClient* client, int port) { |
| 25 client->client_address_ = IPEndPoint(client->client_address_.address(), port); | 25 client->client_address_ = IPEndPoint(client->client_address_.address(), port); |
| 26 } | 26 } |
| 27 | 27 |
| 28 // static |
| 29 void QuicClientPeer::SetWriter(QuicClient* client, QuicPacketWriter* writer) { |
| 30 client->writer_.reset(writer); |
| 31 } |
| 32 |
| 28 } // namespace test | 33 } // namespace test |
| 29 } // namespace tools | 34 } // namespace tools |
| 30 } // namespace net | 35 } // namespace net |
| OLD | NEW |