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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 // ExpectCertificates controls whether the server is expected to provide | 83 // ExpectCertificates controls whether the server is expected to provide |
84 // certificates. The certificates, if any, are not verified, but the common | 84 // certificates. The certificates, if any, are not verified, but the common |
85 // name is recorded and available with |cert_common_name()|. | 85 // name is recorded and available with |cert_common_name()|. |
86 void ExpectCertificates(bool on); | 86 void ExpectCertificates(bool on); |
87 | 87 |
88 // Sets the |user_agent_id| of the |client_|. | 88 // Sets the |user_agent_id| of the |client_|. |
89 void SetUserAgentID(const std::string& user_agent_id); | 89 void SetUserAgentID(const std::string& user_agent_id); |
90 | 90 |
91 // Wraps data in a quic packet and sends it. | 91 // Wraps data in a quic packet and sends it. |
92 ssize_t SendData(std::string data, bool last_data); | 92 ssize_t SendData(const std::string& data, bool last_data); |
93 // As above, but |delegate| will be notified when |data| is ACKed. | 93 // As above, but |delegate| will be notified when |data| is ACKed. |
94 ssize_t SendData(std::string data, | 94 ssize_t SendData(const std::string& data, |
95 bool last_data, | 95 bool last_data, |
96 QuicAckNotifier::DelegateInterface* delegate); | 96 QuicAckNotifier::DelegateInterface* delegate); |
97 | 97 |
98 // From SimpleClient | 98 // From SimpleClient |
99 // Clears any outstanding state and sends a simple GET of 'uri' to the | 99 // Clears any outstanding state and sends a simple GET of 'uri' to the |
100 // server. Returns 0 if the request failed and no bytes were written. | 100 // server. Returns 0 if the request failed and no bytes were written. |
101 ssize_t SendRequest(const std::string& uri) override; | 101 ssize_t SendRequest(const std::string& uri) override; |
102 // Sends requests for all the urls and waits for the responses. To process | 102 // Sends requests for all the urls and waits for the responses. To process |
103 // the individual responses as they are returned, the caller should use the | 103 // the individual responses as they are returned, the caller should use the |
104 // set the response_listener on the client(). | 104 // set the response_listener on the client(). |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 | 250 |
251 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 251 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
252 }; | 252 }; |
253 | 253 |
254 } // namespace test | 254 } // namespace test |
255 | 255 |
256 } // namespace tools | 256 } // namespace tools |
257 } // namespace net | 257 } // namespace net |
258 | 258 |
259 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 259 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |