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

Side by Side Diff: net/tools/quic/quic_client_bin.cc

Issue 2516033003: Landing Recent QUIC changes until Mon Nov 14 04:43:50 2016 +0000 (Closed)
Patch Set: Remove unused UpdatePacketGapSentHistogram() function. Created 4 years, 1 month 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_default_packet_writer.h » ('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 binary wrapper for QuicClient. 5 // A binary wrapper for QuicClient.
6 // Connects to a host using QUIC, sends a request to the provided URL, and 6 // Connects to a host using QUIC, sends a request to the provided URL, and
7 // displays the response. 7 // displays the response.
8 // 8 //
9 // Some usage examples: 9 // Some usage examples:
10 // 10 //
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 } 282 }
283 if (!client.Connect()) { 283 if (!client.Connect()) {
284 net::QuicErrorCode error = client.session()->error(); 284 net::QuicErrorCode error = client.session()->error();
285 if (FLAGS_version_mismatch_ok && error == net::QUIC_INVALID_VERSION) { 285 if (FLAGS_version_mismatch_ok && error == net::QUIC_INVALID_VERSION) {
286 cout << "Server talks QUIC, but none of the versions supported by " 286 cout << "Server talks QUIC, but none of the versions supported by "
287 << "this client: " << QuicVersionVectorToString(versions) << endl; 287 << "this client: " << QuicVersionVectorToString(versions) << endl;
288 // Version mismatch is not deemed a failure. 288 // Version mismatch is not deemed a failure.
289 return 0; 289 return 0;
290 } 290 }
291 cerr << "Failed to connect to " << host_port 291 cerr << "Failed to connect to " << host_port
292 << ". Error: " << net::QuicUtils::ErrorToString(error) << endl; 292 << ". Error: " << net::QuicErrorCodeToString(error) << endl;
293 return 1; 293 return 1;
294 } 294 }
295 cout << "Connected to " << host_port << endl; 295 cout << "Connected to " << host_port << endl;
296 296
297 // Construct the string body from flags, if provided. 297 // Construct the string body from flags, if provided.
298 string body = FLAGS_body; 298 string body = FLAGS_body;
299 if (!FLAGS_body_hex.empty()) { 299 if (!FLAGS_body_hex.empty()) {
300 DCHECK(FLAGS_body.empty()) << "Only set one of --body and --body_hex."; 300 DCHECK(FLAGS_body.empty()) << "Only set one of --body and --body_hex.";
301 body = net::QuicUtils::HexDecode(FLAGS_body_hex); 301 body = net::QuicUtils::HexDecode(FLAGS_body_hex);
302 } 302 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 return 0; 367 return 0;
368 } else { 368 } else {
369 cout << "Request failed (redirect " << response_code << ")." << endl; 369 cout << "Request failed (redirect " << response_code << ")." << endl;
370 return 1; 370 return 1;
371 } 371 }
372 } else { 372 } else {
373 cerr << "Request failed (" << response_code << ")." << endl; 373 cerr << "Request failed (" << response_code << ")." << endl;
374 return 1; 374 return 1;
375 } 375 }
376 } 376 }
OLDNEW
« no previous file with comments | « net/tools/quic/end_to_end_test.cc ('k') | net/tools/quic/quic_default_packet_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698