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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 // or the empty string if no signed timestamp was presented. | 178 // or the empty string if no signed timestamp was presented. |
179 const std::string& cert_sct() const; | 179 const std::string& cert_sct() const; |
180 | 180 |
181 // Get the server config map. | 181 // Get the server config map. |
182 QuicTagValueMap GetServerConfig() const; | 182 QuicTagValueMap GetServerConfig() const; |
183 | 183 |
184 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } | 184 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } |
185 | 185 |
186 void set_priority(SpdyPriority priority) { priority_ = priority; } | 186 void set_priority(SpdyPriority priority) { priority_ = priority; } |
187 | 187 |
188 // Sets client's FEC policy. This policy applies to the data stream(s), and | |
189 // also to the headers and crypto streams. | |
190 void SetFecPolicy(FecPolicy fec_policy); | |
191 | |
192 void WaitForWriteToFlush(); | 188 void WaitForWriteToFlush(); |
193 | 189 |
194 EpollServer* epoll_server() { return &epoll_server_; } | 190 EpollServer* epoll_server() { return &epoll_server_; } |
195 | 191 |
196 void set_allow_bidirectional_data(bool value) { | 192 void set_allow_bidirectional_data(bool value) { |
197 allow_bidirectional_data_ = value; | 193 allow_bidirectional_data_ = value; |
198 } | 194 } |
199 | 195 |
200 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } | 196 bool allow_bidirectional_data() const { return allow_bidirectional_data_; } |
201 | 197 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 // The number of HTTP body bytes received. | 254 // The number of HTTP body bytes received. |
259 int64_t response_body_size_; | 255 int64_t response_body_size_; |
260 // True if we tried to connect already since the last call to Disconnect(). | 256 // True if we tried to connect already since the last call to Disconnect(). |
261 bool connect_attempted_; | 257 bool connect_attempted_; |
262 // The client will auto-connect exactly once before sending data. If | 258 // The client will auto-connect exactly once before sending data. If |
263 // something causes a connection reset, it will not automatically reconnect | 259 // something causes a connection reset, it will not automatically reconnect |
264 // unless auto_reconnect_ is true. | 260 // unless auto_reconnect_ is true. |
265 bool auto_reconnect_; | 261 bool auto_reconnect_; |
266 // Should we buffer the response body? Defaults to true. | 262 // Should we buffer the response body? Defaults to true. |
267 bool buffer_body_; | 263 bool buffer_body_; |
268 // FEC policy for data sent by this client. | |
269 FecPolicy fec_policy_; | |
270 // When true allows the sending of a request to continue while the response is | 264 // When true allows the sending of a request to continue while the response is |
271 // arriving. | 265 // arriving. |
272 bool allow_bidirectional_data_; | 266 bool allow_bidirectional_data_; |
273 // For async push promise rendezvous, validation may fail in which | 267 // For async push promise rendezvous, validation may fail in which |
274 // case the request should be retried. | 268 // case the request should be retried. |
275 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_; | 269 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_; |
276 // Number of requests/responses this client has sent/received. | 270 // Number of requests/responses this client has sent/received. |
277 size_t num_requests_; | 271 size_t num_requests_; |
278 size_t num_responses_; | 272 size_t num_responses_; |
279 | 273 |
280 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 274 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
281 }; | 275 }; |
282 | 276 |
283 } // namespace test | 277 } // namespace test |
284 | 278 |
285 } // namespace net | 279 } // namespace net |
286 | 280 |
287 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 281 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
OLD | NEW |