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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 bool StartConnect(); | 62 bool StartConnect(); |
63 | 63 |
64 // Returns true if the crypto handshake has yet to establish encryption. | 64 // Returns true if the crypto handshake has yet to establish encryption. |
65 // Returns false if encryption is active (even if the server hasn't confirmed | 65 // Returns false if encryption is active (even if the server hasn't confirmed |
66 // the handshake) or if the connection has been closed. | 66 // the handshake) or if the connection has been closed. |
67 bool EncryptionBeingEstablished(); | 67 bool EncryptionBeingEstablished(); |
68 | 68 |
69 // Disconnects from the QUIC server. | 69 // Disconnects from the QUIC server. |
70 void Disconnect(); | 70 void Disconnect(); |
71 | 71 |
72 // Sends a request simple GET for each URL in arg, and then waits for | 72 // Sends a request simple GET for each URL in |args|, and then waits for |
73 // each to complete. | 73 // each to complete. |
74 void SendRequestsAndWaitForResponse(const CommandLine::StringVector& args); | 74 void SendRequestsAndWaitForResponse(const CommandLine::StringVector& args); |
75 | 75 |
76 // Returns a newly created CreateReliableClientStream, owned by the | 76 // Returns a newly created CreateReliableClientStream, owned by the |
77 // QuicClient. | 77 // QuicClient. |
78 QuicSpdyClientStream* CreateReliableClientStream(); | 78 QuicSpdyClientStream* CreateReliableClientStream(); |
79 | 79 |
80 // Wait for events until the stream with the given ID is closed. | 80 // Wait for events until the stream with the given ID is closed. |
81 void WaitForStreamToClose(QuicStreamId id); | 81 void WaitForStreamToClose(QuicStreamId id); |
82 | 82 |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 // when the stream is closed (in OnClose). | 208 // when the stream is closed (in OnClose). |
209 bool print_response_; | 209 bool print_response_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(QuicClient); | 211 DISALLOW_COPY_AND_ASSIGN(QuicClient); |
212 }; | 212 }; |
213 | 213 |
214 } // namespace tools | 214 } // namespace tools |
215 } // namespace net | 215 } // namespace net |
216 | 216 |
217 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ | 217 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ |
OLD | NEW |