Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: net/tools/quic/quic_client.h

Issue 851503003: Update from https://crrev.com/311076 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 QuicPacketWriter* Create(QuicConnection* connection) const override; 197 QuicPacketWriter* Create(QuicConnection* connection) const override;
198 198
199 private: 199 private:
200 QuicPacketWriter* writer_; 200 QuicPacketWriter* writer_;
201 }; 201 };
202 202
203 // Used during initialization: creates the UDP socket FD, sets socket options, 203 // Used during initialization: creates the UDP socket FD, sets socket options,
204 // and binds the socket to our address. 204 // and binds the socket to our address.
205 bool CreateUDPSocket(); 205 bool CreateUDPSocket();
206 206
207 // If the socket has been created, then unregister and close() the FD.
208 void CleanUpUDPSocket();
209
207 // Read a UDP packet and hand it to the framer. 210 // Read a UDP packet and hand it to the framer.
208 bool ReadAndProcessPacket(); 211 bool ReadAndProcessPacket();
209 212
210 // Address of the server. 213 // Address of the server.
211 const IPEndPoint server_address_; 214 const IPEndPoint server_address_;
212 215
213 // |server_id_| is a tuple (hostname, port, is_https) of the server. 216 // |server_id_| is a tuple (hostname, port, is_https) of the server.
214 QuicServerId server_id_; 217 QuicServerId server_id_;
215 218
216 // config_ and crypto_config_ contain configuration and cached state about 219 // config_ and crypto_config_ contain configuration and cached state about
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 // when the stream is closed (in OnClose). 268 // when the stream is closed (in OnClose).
266 bool print_response_; 269 bool print_response_;
267 270
268 DISALLOW_COPY_AND_ASSIGN(QuicClient); 271 DISALLOW_COPY_AND_ASSIGN(QuicClient);
269 }; 272 };
270 273
271 } // namespace tools 274 } // namespace tools
272 } // namespace net 275 } // namespace net
273 276
274 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_ 277 #endif // NET_TOOLS_QUIC_QUIC_CLIENT_H_
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698