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

Unified Diff: net/tools/quic/quic_server_bin.cc

Issue 1036023002: Move remaining QUIC server files from net/quic/ to net/tools/quic/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/tools/quic/quic_server_bin.cc
diff --git a/net/quic/quic_server_bin.cc b/net/tools/quic/quic_server_bin.cc
similarity index 90%
copy from net/quic/quic_server_bin.cc
copy to net/tools/quic/quic_server_bin.cc
index 8d6f47a1e1c05ac874828f1fe8807f2382fcf368..cdedbe3c9b997b22f1602902b8b8afb1553e3c54 100644
--- a/net/quic/quic_server_bin.cc
+++ b/net/tools/quic/quic_server_bin.cc
@@ -15,8 +15,8 @@
#include "base/strings/string_number_conversions.h"
#include "net/base/ip_endpoint.h"
#include "net/quic/quic_protocol.h"
-#include "net/quic/quic_server.h"
#include "net/tools/quic/quic_in_memory_cache.h"
+#include "net/tools/quic/quic_server.h"
// The port the quic server will listen on.
int32 FLAGS_port = 6121;
@@ -58,17 +58,17 @@ int main(int argc, char *argv[]) {
}
net::IPAddressNumber ip;
- CHECK(net::ParseIPLiteralToNumber("::", &ip));
+ CHECK(net::ParseIPLiteralToNumber("127.0.0.1", &ip));
net::QuicConfig config;
- net::QuicServer server(config, net::QuicSupportedVersions());
+ net::tools::QuicServer server(config, net::QuicSupportedVersions());
int rc = server.Listen(net::IPEndPoint(ip, FLAGS_port));
if (rc < 0) {
return 1;
}
- base::RunLoop().Run();
-
- return 0;
+ while (1) {
+ server.WaitForEvents();
+ }
ramant (doing other things) 2015/03/26 18:09:24 nit: should we have return 0 at the end?
Ryan Hamilton 2015/03/26 18:59:49 I think that code will be unreachable. Let's see w
}

Powered by Google App Engine
This is Rietveld 408576698