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

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

Issue 13741012: Moving net/tools/quic code to net::tools namspace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_session.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. Connects to --hostname on 5 // A binary wrapper for QuicClient. Connects to --hostname on
6 // --port and requests URLs specified on the command line. 6 // --port and requests URLs specified on the command line.
7 // 7 //
8 // For example: 8 // For example:
9 // quic_client --port 6122 /index.html /favicon.ico 9 // quic_client --port 6122 /index.html /favicon.ico
10 10
11 #include "base/at_exit.h" 11 #include "base/at_exit.h"
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "net/base/ip_endpoint.h" 14 #include "net/base/ip_endpoint.h"
15 #include "net/tools/quic/quic_client.h" 15 #include "net/tools/quic/quic_client.h"
16 16
17 int32 FLAGS_port = 6121; 17 int32 FLAGS_port = 6121;
18 std::string FLAGS_address = "127.0.0.1"; 18 std::string FLAGS_address = "127.0.0.1";
19 std::string FLAGS_hostname = "localhost"; 19 std::string FLAGS_hostname = "localhost";
20 20
21 int main(int argc, char *argv[]) { 21 int main(int argc, char *argv[]) {
22 CommandLine::Init(argc, argv); 22 CommandLine::Init(argc, argv);
23 23
24 24
25 base::AtExitManager exit_manager; 25 base::AtExitManager exit_manager;
26 26
27 net::IPAddressNumber addr; 27 net::IPAddressNumber addr;
28 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr)); 28 CHECK(net::ParseIPLiteralToNumber(FLAGS_address, &addr));
29 net::QuicClient client( 29 net::tools::QuicClient client(
30 net::IPEndPoint(addr, FLAGS_port), FLAGS_hostname); 30 net::IPEndPoint(addr, FLAGS_port), FLAGS_hostname);
31 31
32 client.Initialize(); 32 client.Initialize();
33 33
34 if (!client.Connect()) return 1; 34 if (!client.Connect()) return 1;
35 35
36 client.SendRequestsAndWaitForResponse(argc, argv); 36 client.SendRequestsAndWaitForResponse(argc, argv);
37 return 0; 37 return 0;
38 } 38 }
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client.cc ('k') | net/tools/quic/quic_client_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698