| 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 // A toy client, which connects to a specified port and sends QUIC | 5 // A toy client, which connects to a specified port and sends QUIC |
| 6 // request to that endpoint. | 6 // request to that endpoint. |
| 7 | 7 |
| 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 9 #define NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| 10 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 base::StringPiece body, | 90 base::StringPiece body, |
| 91 bool fin); | 91 bool fin); |
| 92 | 92 |
| 93 // Sends an HTTP request and waits for response before returning. | 93 // Sends an HTTP request and waits for response before returning. |
| 94 void SendRequestAndWaitForResponse(const BalsaHeaders& headers, | 94 void SendRequestAndWaitForResponse(const BalsaHeaders& headers, |
| 95 base::StringPiece body, | 95 base::StringPiece body, |
| 96 bool fin); | 96 bool fin); |
| 97 | 97 |
| 98 // Sends a request simple GET for each URL in |args|, and then waits for | 98 // Sends a request simple GET for each URL in |args|, and then waits for |
| 99 // each to complete. | 99 // each to complete. |
| 100 void SendRequestsAndWaitForResponse( | 100 void SendRequestsAndWaitForResponse(const |
| 101 const std::vector<std::string>& url_list); | 101 base::CommandLine::StringVector& args); |
| 102 | 102 |
| 103 // Returns a newly created QuicSpdyClientStream, owned by the | 103 // Returns a newly created QuicSpdyClientStream, owned by the |
| 104 // QuicClient. | 104 // QuicClient. |
| 105 QuicSpdyClientStream* CreateReliableClientStream(); | 105 QuicSpdyClientStream* CreateReliableClientStream(); |
| 106 | 106 |
| 107 // Wait for events until the stream with the given ID is closed. | 107 // Wait for events until the stream with the given ID is closed. |
| 108 void WaitForStreamToClose(QuicStreamId id); | 108 void WaitForStreamToClose(QuicStreamId id); |
| 109 | 109 |
| 110 // Wait for events until the handshake is confirmed. | 110 // Wait for events until the handshake is confirmed. |
| 111 void WaitForCryptoHandshakeConfirmed(); | 111 void WaitForCryptoHandshakeConfirmed(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 // Body of most recent response. | 289 // Body of most recent response. |
| 290 std::string latest_response_body_; | 290 std::string latest_response_body_; |
| 291 | 291 |
| 292 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 292 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 293 }; | 293 }; |
| 294 | 294 |
| 295 } // namespace tools | 295 } // namespace tools |
| 296 } // namespace net | 296 } // namespace net |
| 297 | 297 |
| 298 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 298 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |