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 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ | 5 #ifndef NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ |
6 #define NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ | 6 #define NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "net/quic/quic_framer.h" | 11 #include "net/quic/quic_framer.h" |
12 #include "net/quic/quic_packet_creator.h" | 12 #include "net/quic/quic_packet_creator.h" |
13 #include "net/quic/quic_protocol.h" | 13 #include "net/quic/quic_protocol.h" |
14 #include "net/tools/quic/quic_client.h" | 14 #include "net/tools/quic/quic_client.h" |
15 | 15 |
16 namespace net { | 16 namespace net { |
| 17 namespace tools { |
17 | 18 |
18 namespace test { | 19 namespace test { |
19 | 20 |
20 class HTTPMessage; | 21 class HTTPMessage; |
21 | 22 |
22 // A toy QUIC client used for testing. | 23 // A toy QUIC client used for testing. |
23 class QuicTestClient : public ReliableQuicStream::Visitor { | 24 class QuicTestClient : public ReliableQuicStream::Visitor { |
24 public: | 25 public: |
25 QuicTestClient(IPEndPoint server_address, const string& server_hostname); | 26 QuicTestClient(IPEndPoint server_address, const string& server_hostname); |
26 virtual ~QuicTestClient(); | 27 virtual ~QuicTestClient(); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 uint64 bytes_read_; | 84 uint64 bytes_read_; |
84 uint64 bytes_written_; | 85 uint64 bytes_written_; |
85 // True if the client has never connected before. The client will | 86 // True if the client has never connected before. The client will |
86 // auto-connect exactly once before sending data. If something causes a | 87 // auto-connect exactly once before sending data. If something causes a |
87 // connection reset, it will not automatically reconnect. | 88 // connection reset, it will not automatically reconnect. |
88 bool never_connected_; | 89 bool never_connected_; |
89 }; | 90 }; |
90 | 91 |
91 } // namespace test | 92 } // namespace test |
92 | 93 |
| 94 } // namespace tools |
93 } // namespace net | 95 } // namespace net |
94 | 96 |
95 #endif // NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ | 97 #endif // NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ |
OLD | NEW |