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

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

Issue 322333003: Set default config values in quic_client_bin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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. Connects to --hostname via --address 5 // A binary wrapper for QuicClient. Connects to --hostname via --address
6 // on --port and requests URLs specified on the command line. 6 // on --port and requests URLs specified on the command line.
7 // Pass --secure to check the certificates using proof verifier. 7 // Pass --secure to check the certificates using proof verifier.
8 // Pass --initial_flow_control_window to specify the size of the initial flow 8 // Pass --initial_flow_control_window to specify the size of the initial flow
9 // control receive window to advertise to server. 9 // control receive window to advertise to server.
10 // 10 //
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 << " address: " << FLAGS_address 74 << " address: " << FLAGS_address
75 << " hostname: " << FLAGS_hostname 75 << " hostname: " << FLAGS_hostname
76 << " secure: " << FLAGS_secure; 76 << " secure: " << FLAGS_secure;
77 77
78 base::AtExitManager exit_manager; 78 base::AtExitManager exit_manager;
79 79
80 net::IPAddressNumber addr; 80 net::IPAddressNumber addr;
81 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr)); 81 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr));
82 82
83 net::QuicConfig config; 83 net::QuicConfig config;
84 config.SetDefaults();
84 config.SetInitialFlowControlWindowToSend(FLAGS_initial_flow_control_window); 85 config.SetInitialFlowControlWindowToSend(FLAGS_initial_flow_control_window);
85 86
86 // TODO(rjshade): Set version on command line. 87 // TODO(rjshade): Set version on command line.
87 net::tools::QuicClient client( 88 net::tools::QuicClient client(
88 net::IPEndPoint(addr, FLAGS_port), 89 net::IPEndPoint(addr, FLAGS_port),
89 net::QuicServerId(FLAGS_hostname, FLAGS_port, FLAGS_secure, 90 net::QuicServerId(FLAGS_hostname, FLAGS_port, FLAGS_secure,
90 net::PRIVACY_MODE_DISABLED), 91 net::PRIVACY_MODE_DISABLED),
91 net::QuicSupportedVersions(), true, config); 92 net::QuicSupportedVersions(), true, config);
92 93
93 client.Initialize(); 94 client.Initialize();
94 95
95 if (!client.Connect()) return 1; 96 if (!client.Connect()) return 1;
96 97
97 client.SendRequestsAndWaitForResponse(line->GetArgs()); 98 client.SendRequestsAndWaitForResponse(line->GetArgs());
98 return 0; 99 return 0;
99 } 100 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698