| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // A toy client, which connects to a specified port and sends QUIC | 5 // A toy client, which connects to a specified port and sends QUIC |
| 6 // request to that endpoint. | 6 // request to that endpoint. |
| 7 | 7 |
| 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| 10 | 10 |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 IPAddressNumber* client_ip); | 200 IPAddressNumber* client_ip); |
| 201 | 201 |
| 202 EpollServer* epoll_server() { return epoll_server_; } | 202 EpollServer* epoll_server() { return epoll_server_; } |
| 203 | 203 |
| 204 private: | 204 private: |
| 205 friend class net::tools::test::QuicClientPeer; | 205 friend class net::tools::test::QuicClientPeer; |
| 206 | 206 |
| 207 // A packet writer factory that always returns the same writer | 207 // A packet writer factory that always returns the same writer |
| 208 class DummyPacketWriterFactory : public QuicConnection::PacketWriterFactory { | 208 class DummyPacketWriterFactory : public QuicConnection::PacketWriterFactory { |
| 209 public: | 209 public: |
| 210 DummyPacketWriterFactory(QuicPacketWriter* writer); | 210 explicit DummyPacketWriterFactory(QuicPacketWriter* writer); |
| 211 ~DummyPacketWriterFactory() override; | 211 ~DummyPacketWriterFactory() override; |
| 212 | 212 |
| 213 QuicPacketWriter* Create(QuicConnection* connection) const override; | 213 QuicPacketWriter* Create(QuicConnection* connection) const override; |
| 214 | 214 |
| 215 private: | 215 private: |
| 216 QuicPacketWriter* writer_; | 216 QuicPacketWriter* writer_; |
| 217 }; | 217 }; |
| 218 | 218 |
| 219 // Used during initialization: creates the UDP socket FD, sets socket options, | 219 // Used during initialization: creates the UDP socket FD, sets socket options, |
| 220 // and binds the socket to our address. | 220 // and binds the socket to our address. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Body of most recent response. | 289 // Body of most recent response. |
| 290 std::string latest_response_body_; | 290 std::string latest_response_body_; |
| 291 | 291 |
| 292 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 292 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 293 }; | 293 }; |
| 294 | 294 |
| 295 } // namespace tools | 295 } // namespace tools |
| 296 } // namespace net | 296 } // namespace net |
| 297 | 297 |
| 298 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 298 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |