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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 // ExpectCertificates controls whether the server is expected to provide | 77 // ExpectCertificates controls whether the server is expected to provide |
78 // certificates. The certificates, if any, are not verified, but the common | 78 // certificates. The certificates, if any, are not verified, but the common |
79 // name is recorded and available with |cert_common_name()|. | 79 // name is recorded and available with |cert_common_name()|. |
80 void ExpectCertificates(bool on); | 80 void ExpectCertificates(bool on); |
81 | 81 |
82 // Sets the |user_agent_id| of the |client_|. | 82 // Sets the |user_agent_id| of the |client_|. |
83 void SetUserAgentID(const std::string& user_agent_id); | 83 void SetUserAgentID(const std::string& user_agent_id); |
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(std::string data, bool last_data); | 86 ssize_t SendData(std::string data, bool last_data); |
| 87 // As above, but |delegate| will be notified when |data| is ACKed. |
| 88 ssize_t SendData(std::string data, |
| 89 bool last_data, |
| 90 QuicAckNotifier::DelegateInterface* delegate); |
87 | 91 |
88 // From SimpleClient | 92 // From SimpleClient |
89 // Clears any outstanding state and sends a simple GET of 'uri' to the | 93 // Clears any outstanding state and sends a simple GET of 'uri' to the |
90 // server. Returns 0 if the request failed and no bytes were written. | 94 // server. Returns 0 if the request failed and no bytes were written. |
91 ssize_t SendRequest(const std::string& uri) override; | 95 ssize_t SendRequest(const std::string& uri) override; |
92 ssize_t SendMessage(const HTTPMessage& message) override; | 96 ssize_t SendMessage(const HTTPMessage& message) override; |
93 std::string SendCustomSynchronousRequest(const HTTPMessage& message) override; | 97 std::string SendCustomSynchronousRequest(const HTTPMessage& message) override; |
94 std::string SendSynchronousRequest(const std::string& uri) override; | 98 std::string SendSynchronousRequest(const std::string& uri) override; |
95 void Connect() override; | 99 void Connect() override; |
96 void ResetConnection() override; | 100 void ResetConnection() override; |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 | 206 |
203 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 207 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
204 }; | 208 }; |
205 | 209 |
206 } // namespace test | 210 } // namespace test |
207 | 211 |
208 } // namespace tools | 212 } // namespace tools |
209 } // namespace net | 213 } // namespace net |
210 | 214 |
211 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 215 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |