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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace tools { | 22 namespace tools { |
23 | 23 |
24 namespace test { | 24 namespace test { |
25 | 25 |
26 class HTTPMessage; | 26 class HTTPMessage; |
27 | 27 |
28 // A toy QUIC client used for testing. | 28 // A toy QUIC client used for testing. |
29 class QuicTestClient : public ReliableQuicStream::Visitor { | 29 class QuicTestClient : public ReliableQuicStream::Visitor { |
30 public: | 30 public: |
31 QuicTestClient(IPEndPoint server_address, const string& server_hostname, | 31 QuicTestClient(IPEndPoint server_address, const string& server_hostname, |
32 const QuicVersion version); | 32 const QuicVersionVector& supported_versions); |
33 QuicTestClient(IPEndPoint server_address, | 33 QuicTestClient(IPEndPoint server_address, |
34 const string& server_hostname, | 34 const string& server_hostname, |
35 bool secure, | 35 bool secure, |
36 const QuicVersion version); | 36 const QuicVersionVector& supported_versions); |
37 QuicTestClient(IPEndPoint server_address, | 37 QuicTestClient(IPEndPoint server_address, |
38 const string& server_hostname, | 38 const string& server_hostname, |
39 bool secure, | 39 bool secure, |
40 const QuicConfig& config, | 40 const QuicConfig& config, |
41 const QuicVersion version); | 41 const QuicVersionVector& supported_versions); |
42 | 42 |
43 virtual ~QuicTestClient(); | 43 virtual ~QuicTestClient(); |
44 | 44 |
45 // ExpectCertificates controls whether the server is expected to provide | 45 // ExpectCertificates controls whether the server is expected to provide |
46 // certificates. The certificates, if any, are not verified, but the common | 46 // certificates. The certificates, if any, are not verified, but the common |
47 // name is recorded and available with |cert_common_name()|. | 47 // name is recorded and available with |cert_common_name()|. |
48 void ExpectCertificates(bool on); | 48 void ExpectCertificates(bool on); |
49 | 49 |
50 // Clears any outstanding state and sends a simple GET of 'uri' to the | 50 // Clears any outstanding state and sends a simple GET of 'uri' to the |
51 // server. Returns 0 if the request failed and no bytes were written. | 51 // server. Returns 0 if the request failed and no bytes were written. |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 // client_. | 132 // client_. |
133 ProofVerifier* proof_verifier_; | 133 ProofVerifier* proof_verifier_; |
134 }; | 134 }; |
135 | 135 |
136 } // namespace test | 136 } // namespace test |
137 | 137 |
138 } // namespace tools | 138 } // namespace tools |
139 } // namespace net | 139 } // namespace net |
140 | 140 |
141 #endif // NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ | 141 #endif // NET_QUIC_TEST_TOOLS_QUIC_CLIENT_H_ |
OLD | NEW |