| OLD | NEW |
| 1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 // A base class for the toy client, which connects to a specified port and sends | 5 // A base class for the toy client, which connects to a specified port and sends |
| 6 // QUIC request to that endpoint. | 6 // QUIC request to that endpoint. |
| 7 | 7 |
| 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| 10 | 10 |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 void SendRequestAndWaitForResponse(const SpdyHeaderBlock& headers, | 115 void SendRequestAndWaitForResponse(const SpdyHeaderBlock& headers, |
| 116 base::StringPiece body, | 116 base::StringPiece body, |
| 117 bool fin); | 117 bool fin); |
| 118 | 118 |
| 119 // Sends a request simple GET for each URL in |url_list|, and then waits for | 119 // Sends a request simple GET for each URL in |url_list|, and then waits for |
| 120 // each to complete. | 120 // each to complete. |
| 121 void SendRequestsAndWaitForResponse(const std::vector<std::string>& url_list); | 121 void SendRequestsAndWaitForResponse(const std::vector<std::string>& url_list); |
| 122 | 122 |
| 123 // Returns a newly created QuicSpdyClientStream, owned by the | 123 // Returns a newly created QuicSpdyClientStream, owned by the |
| 124 // QuicSimpleClient. | 124 // QuicSimpleClient. |
| 125 virtual QuicSpdyClientStream* CreateReliableClientStream(); | 125 virtual QuicSpdyClientStream* CreateClientStream(); |
| 126 | 126 |
| 127 // Wait for events until the stream with the given ID is closed. | 127 // Wait for events until the stream with the given ID is closed. |
| 128 void WaitForStreamToClose(QuicStreamId id); | 128 void WaitForStreamToClose(QuicStreamId id); |
| 129 | 129 |
| 130 // Wait for events until the handshake is confirmed. | 130 // Wait for events until the handshake is confirmed. |
| 131 void WaitForCryptoHandshakeConfirmed(); | 131 void WaitForCryptoHandshakeConfirmed(); |
| 132 | 132 |
| 133 // Wait up to 50ms, and handle any events which occur. | 133 // Wait up to 50ms, and handle any events which occur. |
| 134 // Returns true if there are any outstanding requests. | 134 // Returns true if there are any outstanding requests. |
| 135 bool WaitForEvents(); | 135 bool WaitForEvents(); |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 std::vector<std::unique_ptr<QuicDataToResend>> data_to_resend_on_connect_; | 458 std::vector<std::unique_ptr<QuicDataToResend>> data_to_resend_on_connect_; |
| 459 | 459 |
| 460 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; | 460 std::unique_ptr<ClientQuicDataToResend> push_promise_data_to_resend_; |
| 461 | 461 |
| 462 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); | 462 DISALLOW_COPY_AND_ASSIGN(QuicClientBase); |
| 463 }; | 463 }; |
| 464 | 464 |
| 465 } // namespace net | 465 } // namespace net |
| 466 | 466 |
| 467 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ | 467 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_BASE_H_ |
| OLD | NEW |