| 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_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 5 #ifndef NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
| 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 6 #define NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 virtual ~QuicTestClient(); | 78 virtual ~QuicTestClient(); |
| 79 | 79 |
| 80 // ExpectCertificates controls whether the server is expected to provide | 80 // ExpectCertificates controls whether the server is expected to provide |
| 81 // certificates. The certificates, if any, are not verified, but the common | 81 // certificates. The certificates, if any, are not verified, but the common |
| 82 // name is recorded and available with |cert_common_name()|. | 82 // name is recorded and available with |cert_common_name()|. |
| 83 void ExpectCertificates(bool on); | 83 void ExpectCertificates(bool on); |
| 84 | 84 |
| 85 // Wraps data in a quic packet and sends it. | 85 // Wraps data in a quic packet and sends it. |
| 86 ssize_t SendData(string data, bool last_data); | 86 ssize_t SendData(string data, bool last_data); |
| 87 | 87 |
| 88 QuicPacketCreator::Options* options(); | |
| 89 | |
| 90 // From SimpleClient | 88 // From SimpleClient |
| 91 // Clears any outstanding state and sends a simple GET of 'uri' to the | 89 // Clears any outstanding state and sends a simple GET of 'uri' to the |
| 92 // server. Returns 0 if the request failed and no bytes were written. | 90 // server. Returns 0 if the request failed and no bytes were written. |
| 93 virtual ssize_t SendRequest(const string& uri) OVERRIDE; | 91 virtual ssize_t SendRequest(const string& uri) OVERRIDE; |
| 94 virtual ssize_t SendMessage(const HTTPMessage& message) OVERRIDE; | 92 virtual ssize_t SendMessage(const HTTPMessage& message) OVERRIDE; |
| 95 virtual string SendCustomSynchronousRequest( | 93 virtual string SendCustomSynchronousRequest( |
| 96 const HTTPMessage& message) OVERRIDE; | 94 const HTTPMessage& message) OVERRIDE; |
| 97 virtual string SendSynchronousRequest(const string& uri) OVERRIDE; | 95 virtual string SendSynchronousRequest(const string& uri) OVERRIDE; |
| 98 virtual void Connect() OVERRIDE; | 96 virtual void Connect() OVERRIDE; |
| 99 virtual void ResetConnection() OVERRIDE; | 97 virtual void ResetConnection() OVERRIDE; |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 | 196 |
| 199 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 197 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
| 200 }; | 198 }; |
| 201 | 199 |
| 202 } // namespace test | 200 } // namespace test |
| 203 | 201 |
| 204 } // namespace tools | 202 } // namespace tools |
| 205 } // namespace net | 203 } // namespace net |
| 206 | 204 |
| 207 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 205 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
| OLD | NEW |