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

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

Issue 25043005: Add better help information to quic_client and quic_server. Also, (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/tools/quic/quic_reliable_client_stream_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_server_bin.cc
diff --git a/net/tools/quic/quic_server_bin.cc b/net/tools/quic/quic_server_bin.cc
index cccf57819f5a9c04104ad2b8f2e3285dd1702116..a71cbcf62182e315e31e98088a48c53413e04154 100644
--- a/net/tools/quic/quic_server_bin.cc
+++ b/net/tools/quic/quic_server_bin.cc
@@ -5,6 +5,8 @@
// A binary wrapper for QuicServer. It listens forever on --port
// (default 6121) until it's killed or ctrl-cd to death.
+#include <iostream>
+
#include "base/at_exit.h"
#include "base/basictypes.h"
#include "base/command_line.h"
@@ -20,6 +22,19 @@ int32 FLAGS_port = 6121;
int main(int argc, char *argv[]) {
CommandLine::Init(argc, argv);
CommandLine* line = CommandLine::ForCurrentProcess();
+ if (line->HasSwitch("h") || line->HasSwitch("help")) {
+ const char* help_str =
+ "Usage: quic_server [options]\n"
+ "\n"
+ "Options:\n"
+ "-h, --help show this help message and exit\n"
+ "--port=<port> specify the port to listen on\n"
+ "--quic_in_memory_cache_dir directory containing response data\n"
+ " to load\n";
+ std::cout << help_str;
+ exit(0);
+ }
+
if (line->HasSwitch("quic_in_memory_cache_dir")) {
net::tools::FLAGS_quic_in_memory_cache_dir =
line->GetSwitchValueASCII("quic_in_memory_cache_dir");
« no previous file with comments | « net/tools/quic/quic_reliable_client_stream_test.cc ('k') | net/tools/quic/quic_spdy_client_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698