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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 // cert_sct returns the signed timestamp of the server's certificate, | 164 // cert_sct returns the signed timestamp of the server's certificate, |
165 // or the empty string if no signed timestamp was presented. | 165 // or the empty string if no signed timestamp was presented. |
166 const std::string& cert_sct() const; | 166 const std::string& cert_sct() const; |
167 | 167 |
168 // Get the server config map. | 168 // Get the server config map. |
169 QuicTagValueMap GetServerConfig() const; | 169 QuicTagValueMap GetServerConfig() const; |
170 | 170 |
171 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } | 171 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } |
172 | 172 |
173 void set_priority(QuicPriority priority) { priority_ = priority; } | 173 void set_priority(SpdyPriority priority) { priority_ = priority; } |
174 | 174 |
175 // Sets client's FEC policy. This policy applies to the data stream(s), and | 175 // Sets client's FEC policy. This policy applies to the data stream(s), and |
176 // also to the headers and crypto streams. | 176 // also to the headers and crypto streams. |
177 void SetFecPolicy(FecPolicy fec_policy); | 177 void SetFecPolicy(FecPolicy fec_policy); |
178 | 178 |
179 void WaitForWriteToFlush(); | 179 void WaitForWriteToFlush(); |
180 | 180 |
181 EpollServer* epoll_server() { return &epoll_server_; } | 181 EpollServer* epoll_server() { return &epoll_server_; } |
182 | 182 |
183 void set_allow_bidirectional_data(bool value) { | 183 void set_allow_bidirectional_data(bool value) { |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 | 219 |
220 EpollServer epoll_server_; | 220 EpollServer epoll_server_; |
221 scoped_ptr<MockableQuicClient> client_; // The actual client | 221 scoped_ptr<MockableQuicClient> client_; // The actual client |
222 QuicSpdyClientStream* stream_; | 222 QuicSpdyClientStream* stream_; |
223 | 223 |
224 QuicRstStreamErrorCode stream_error_; | 224 QuicRstStreamErrorCode stream_error_; |
225 | 225 |
226 bool response_complete_; | 226 bool response_complete_; |
227 bool response_headers_complete_; | 227 bool response_headers_complete_; |
228 mutable BalsaHeaders headers_; | 228 mutable BalsaHeaders headers_; |
229 QuicPriority priority_; | 229 SpdyPriority priority_; |
230 std::string response_; | 230 std::string response_; |
231 uint64 bytes_read_; | 231 uint64 bytes_read_; |
232 uint64 bytes_written_; | 232 uint64 bytes_written_; |
233 // The number of uncompressed HTTP header bytes received. | 233 // The number of uncompressed HTTP header bytes received. |
234 int response_header_size_; | 234 int response_header_size_; |
235 // The number of HTTP body bytes received. | 235 // The number of HTTP body bytes received. |
236 int64 response_body_size_; | 236 int64 response_body_size_; |
237 // True if we tried to connect already since the last call to Disconnect(). | 237 // True if we tried to connect already since the last call to Disconnect(). |
238 bool connect_attempted_; | 238 bool connect_attempted_; |
239 // The client will auto-connect exactly once before sending data. If | 239 // The client will auto-connect exactly once before sending data. If |
(...skipping 10 matching lines...) Expand all 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 |