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

Side by Side Diff: net/quic/quic_server_bin.cc

Issue 647933002: Call SetDefaults from the QuicConfig constructor instead of requiring (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Allow_number_of_undecryptable_packets_76707156
Patch Set: Created 6 years, 2 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/quic/quic_http_stream_test.cc ('k') | net/quic/quic_stream_factory.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <iostream> 8 #include <iostream>
9 9
10 #include "base/at_exit.h" 10 #include "base/at_exit.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 if (line->HasSwitch("port")) { 50 if (line->HasSwitch("port")) {
51 int port; 51 int port;
52 if (base::StringToInt(line->GetSwitchValueASCII("port"), &port)) { 52 if (base::StringToInt(line->GetSwitchValueASCII("port"), &port)) {
53 FLAGS_port = port; 53 FLAGS_port = port;
54 } 54 }
55 } 55 }
56 56
57 base::AtExitManager exit_manager; 57 base::AtExitManager exit_manager;
58
59 base::MessageLoopForIO message_loop; 58 base::MessageLoopForIO message_loop;
60 59
61 net::IPAddressNumber ip; 60 net::IPAddressNumber ip;
62 CHECK(net::ParseIPLiteralToNumber("::", &ip)); 61 CHECK(net::ParseIPLiteralToNumber("::", &ip));
63 62
64 net::QuicConfig config; 63 net::QuicConfig config;
65 config.SetDefaults();
66
67 net::QuicServer server(config, net::QuicSupportedVersions()); 64 net::QuicServer server(config, net::QuicSupportedVersions());
68 65
69 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port)); 66 int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port));
70 if (rc < 0) { 67 if (rc < 0) {
71 return 1; 68 return 1;
72 } 69 }
73 70
74 base::RunLoop().Run(); 71 base::RunLoop().Run();
75 72
76 return 0; 73 return 0;
77 } 74 }
OLDNEW
« no previous file with comments | « net/quic/quic_http_stream_test.cc ('k') | net/quic/quic_stream_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698