| 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 // Returns true if the crypto handshake has yet to establish encryption. | 75 // Returns true if the crypto handshake has yet to establish encryption. |
| 76 // Returns false if encryption is active (even if the server hasn't confirmed | 76 // Returns false if encryption is active (even if the server hasn't confirmed |
| 77 // the handshake) or if the connection has been closed. | 77 // the handshake) or if the connection has been closed. |
| 78 bool EncryptionBeingEstablished(); | 78 bool EncryptionBeingEstablished(); |
| 79 | 79 |
| 80 // Disconnects from the QUIC server. | 80 // Disconnects from the QUIC server. |
| 81 void Disconnect(); | 81 void Disconnect(); |
| 82 | 82 |
| 83 // Sends a request simple GET for each URL in |args|, and then waits for | 83 // Sends a request simple GET for each URL in |args|, and then waits for |
| 84 // each to complete. | 84 // each to complete. |
| 85 void SendRequestsAndWaitForResponse(const CommandLine::StringVector& args); | 85 void SendRequestsAndWaitForResponse(const |
| 86 base::CommandLine::StringVector& args); |
| 86 | 87 |
| 87 // Returns a newly created QuicSpdyClientStream, owned by the | 88 // Returns a newly created QuicSpdyClientStream, owned by the |
| 88 // QuicClient. | 89 // QuicClient. |
| 89 QuicSpdyClientStream* CreateReliableClientStream(); | 90 QuicSpdyClientStream* CreateReliableClientStream(); |
| 90 | 91 |
| 91 // Wait for events until the stream with the given ID is closed. | 92 // Wait for events until the stream with the given ID is closed. |
| 92 void WaitForStreamToClose(QuicStreamId id); | 93 void WaitForStreamToClose(QuicStreamId id); |
| 93 | 94 |
| 94 // Wait for events until the handshake is confirmed. | 95 // Wait for events until the handshake is confirmed. |
| 95 void WaitForCryptoHandshakeConfirmed(); | 96 void WaitForCryptoHandshakeConfirmed(); |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // when the stream is closed (in OnClose). | 236 // when the stream is closed (in OnClose). |
| 236 bool print_response_; | 237 bool print_response_; |
| 237 | 238 |
| 238 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 239 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
| 239 }; | 240 }; |
| 240 | 241 |
| 241 } // namespace tools | 242 } // namespace tools |
| 242 } // namespace net | 243 } // namespace net |
| 243 | 244 |
| 244 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 245 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
| OLD | NEW |