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_SIMPLE_CLIENT_H_ | 8 #ifndef NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ | 9 #define NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Sends a request simple GET for each URL in |args|, and then waits for | 123 // Sends a request simple GET for each URL in |args|, and then waits for |
124 // each to complete. | 124 // each to complete. |
125 void SendRequestsAndWaitForResponse( | 125 void SendRequestsAndWaitForResponse( |
126 const base::CommandLine::StringVector& url_list); | 126 const base::CommandLine::StringVector& url_list); |
127 | 127 |
128 // Migrate to a new socket during an active connection. | 128 // Migrate to a new socket during an active connection. |
129 bool MigrateSocket(const IPAddressNumber& new_host); | 129 bool MigrateSocket(const IPAddressNumber& new_host); |
130 | 130 |
131 // QuicPacketReader::Visitor | 131 // QuicPacketReader::Visitor |
132 void OnReadError(int result) override; | 132 void OnReadError(int result, const DatagramClientSocket* socket) override; |
133 bool OnPacket(const QuicEncryptedPacket& packet, | 133 bool OnPacket(const QuicEncryptedPacket& packet, |
134 IPEndPoint local_address, | 134 IPEndPoint local_address, |
135 IPEndPoint peer_address) override; | 135 IPEndPoint peer_address) override; |
136 | 136 |
137 // QuicSpdyStream::Visitor | 137 // QuicSpdyStream::Visitor |
138 void OnClose(QuicSpdyStream* stream) override; | 138 void OnClose(QuicSpdyStream* stream) override; |
139 | 139 |
140 // If the crypto handshake has not yet been confirmed, adds the data to the | 140 // If the crypto handshake has not yet been confirmed, adds the data to the |
141 // queue of data to resend if the client receives a stateless reject. | 141 // queue of data to resend if the client receives a stateless reject. |
142 // Otherwise, deletes the data. Takes ownerership of |data_to_resend|. | 142 // Otherwise, deletes the data. Takes ownerership of |data_to_resend|. |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 | 263 |
264 base::WeakPtrFactory<QuicSimpleClient> weak_factory_; | 264 base::WeakPtrFactory<QuicSimpleClient> weak_factory_; |
265 | 265 |
266 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); | 266 DISALLOW_COPY_AND_ASSIGN(QuicSimpleClient); |
267 }; | 267 }; |
268 | 268 |
269 } // namespace tools | 269 } // namespace tools |
270 } // namespace net | 270 } // namespace net |
271 | 271 |
272 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ | 272 #endif // NET_TOOLS_QUIC_QUIC_SIMPLE_CLIENT_H_ |
OLD | NEW |