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

Side by Side Diff: net/tools/quic/quic_server_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_server.cc ('k') | net/tools/quic/quic_server_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 QuicServer. It listens forever on --port 5 // A binary wrapper for QuicServer. It listens forever on --port
6 // (default 6121) until it's killed or ctrl-cd to death. 6 // (default 6121) until it's killed or ctrl-cd to death.
7 7
8 #include "base/at_exit.h" 8 #include "base/at_exit.h"
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "net/base/ip_endpoint.h" 11 #include "net/base/ip_endpoint.h"
12 #include "net/tools/quic/quic_server.h" 12 #include "net/tools/quic/quic_server.h"
13 13
14 // The port the quic server will listen on. 14 // The port the quic server will listen on.
15 int32 FLAGS_port = 6121; 15 int32 FLAGS_port = 6121;
16 16
17 int main(int argc, char *argv[]) { 17 int main(int argc, char *argv[]) {
18 CommandLine::Init(argc, argv); 18 CommandLine::Init(argc, argv);
19 19
20 base::AtExitManager exit_manager; 20 base::AtExitManager exit_manager;
21 21
22 net::IPAddressNumber ip; 22 net::IPAddressNumber ip;
23 CHECK(net::ParseIPLiteralToNumber("::", &ip)); 23 CHECK(net::ParseIPLiteralToNumber("::", &ip));
24 24
25 net::QuicServer server; 25 net::tools::QuicServer server;
26 26
27 if (!server.Listen(net::IPEndPoint(ip, FLAGS_port))) { 27 if (!server.Listen(net::IPEndPoint(ip, FLAGS_port))) {
28 return 1; 28 return 1;
29 } 29 }
30 30
31 while (1) { 31 while (1) {
32 server.WaitForEvents(); 32 server.WaitForEvents();
33 } 33 }
34 34
35 return 0; 35 return 0;
36 } 36 }
OLDNEW
« no previous file with comments | « net/tools/quic/quic_server.cc ('k') | net/tools/quic/quic_server_session.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698