| 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 <cstdint> | 8 #include <cstdint> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 QuicTagValueMap GetServerConfig() const; | 238 QuicTagValueMap GetServerConfig() const; |
| 239 | 239 |
| 240 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } | 240 void set_auto_reconnect(bool reconnect) { auto_reconnect_ = reconnect; } |
| 241 | 241 |
| 242 void set_priority(SpdyPriority priority) { priority_ = priority; } | 242 void set_priority(SpdyPriority priority) { priority_ = priority; } |
| 243 | 243 |
| 244 void WaitForWriteToFlush(); | 244 void WaitForWriteToFlush(); |
| 245 | 245 |
| 246 EpollServer* epoll_server() { return &epoll_server_; } | 246 EpollServer* epoll_server() { return &epoll_server_; } |
| 247 | 247 |
| 248 void set_allow_bidirectional_data(bool value) { | |
| 249 allow_bidirectional_data_ = value; | |
| 250 } | |
| 251 | |
| 252 size_t num_requests() const { return num_requests_; } | 248 size_t num_requests() const { return num_requests_; } |
| 253 | 249 |
| 254 size_t num_responses() const { return num_responses_; } | 250 size_t num_responses() const { return num_responses_; } |
| 255 | 251 |
| 256 void set_server_address(const QuicSocketAddress& server_address) { | 252 void set_server_address(const QuicSocketAddress& server_address) { |
| 257 client_->set_server_address(server_address); | 253 client_->set_server_address(server_address); |
| 258 } | 254 } |
| 259 | 255 |
| 260 void set_peer_address(const QuicSocketAddress& address) { | 256 void set_peer_address(const QuicSocketAddress& address) { |
| 261 client_->set_peer_address(address); | 257 client_->set_peer_address(address); |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 366 // The number of HTTP body bytes received. | 362 // The number of HTTP body bytes received. |
| 367 int64_t response_body_size_; | 363 int64_t response_body_size_; |
| 368 // True if we tried to connect already since the last call to Disconnect(). | 364 // True if we tried to connect already since the last call to Disconnect(). |
| 369 bool connect_attempted_; | 365 bool connect_attempted_; |
| 370 // The client will auto-connect exactly once before sending data. If | 366 // The client will auto-connect exactly once before sending data. If |
| 371 // something causes a connection reset, it will not automatically reconnect | 367 // something causes a connection reset, it will not automatically reconnect |
| 372 // unless auto_reconnect_ is true. | 368 // unless auto_reconnect_ is true. |
| 373 bool auto_reconnect_; | 369 bool auto_reconnect_; |
| 374 // Should we buffer the response body? Defaults to true. | 370 // Should we buffer the response body? Defaults to true. |
| 375 bool buffer_body_; | 371 bool buffer_body_; |
| 376 // When true allows the sending of a request to continue while the response is | |
| 377 // arriving. | |
| 378 bool allow_bidirectional_data_; | |
| 379 // For async push promise rendezvous, validation may fail in which | 372 // For async push promise rendezvous, validation may fail in which |
| 380 // case the request should be retried. | 373 // case the request should be retried. |
| 381 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_; | 374 std::unique_ptr<TestClientDataToResend> push_promise_data_to_resend_; |
| 382 // Number of requests/responses this client has sent/received. | 375 // Number of requests/responses this client has sent/received. |
| 383 size_t num_requests_; | 376 size_t num_requests_; |
| 384 size_t num_responses_; | 377 size_t num_responses_; |
| 385 | 378 |
| 386 // If set, this value is used for the connection SNI, overriding the usual | 379 // If set, this value is used for the connection SNI, overriding the usual |
| 387 // logic which extracts the SNI from the request URL. | 380 // logic which extracts the SNI from the request URL. |
| 388 bool override_sni_set_ = false; | 381 bool override_sni_set_ = false; |
| 389 std::string override_sni_; | 382 std::string override_sni_; |
| 390 | 383 |
| 391 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); | 384 DISALLOW_COPY_AND_ASSIGN(QuicTestClient); |
| 392 }; | 385 }; |
| 393 | 386 |
| 394 } // namespace test | 387 } // namespace test |
| 395 | 388 |
| 396 } // namespace net | 389 } // namespace net |
| 397 | 390 |
| 398 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ | 391 #endif // NET_TOOLS_QUIC_TEST_TOOLS_QUIC_TEST_CLIENT_H_ |
| OLD | NEW |