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

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

Issue 569353003: Increase flow control receive window of quic_client_bin.cc, by adding a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Call_QuicSentPacketManager_OnPacketSerialized_75340764
Patch Set: Created 6 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_client_bin.cc
diff --git a/net/tools/quic/quic_client_bin.cc b/net/tools/quic/quic_client_bin.cc
index 6d5d586ec0e75c0269bccfb65d149f322f0d47e9..4f76624dae6a23b1c43228b1711c1f7a79934f1b 100644
--- a/net/tools/quic/quic_client_bin.cc
+++ b/net/tools/quic/quic_client_bin.cc
@@ -32,6 +32,8 @@ bool FLAGS_secure = false;
// QUIC version to speak, e.g. 21. Default value of 0 means 'use the latest
// version'.
int32 FLAGS_quic_version = 0;
+// Size of flow control receive window to advertize to the peer.
+int32 FLAGS_flow_control_window_bytes = 10 * 1024 * 1024; // 10 Mb
int main(int argc, char *argv[]) {
base::CommandLine::Init(argc, argv);
@@ -54,7 +56,9 @@ int main(int argc, char *argv[]) {
"--address=<address> specify the IP address to connect to\n"
"--host=<host> specify the SNI hostname to use\n"
"--secure check certificates\n"
- "--quic-version=<quic version> specify QUIC version to speak\n";
+ "--quic-version=<quic version> specify QUIC version to speak\n"
+ "--flow-control-window-bytes=<bytes> specify size of flow control "
+ "receive window to advertize to the peer\n";
std::cout << help_str;
exit(0);
}
@@ -80,6 +84,14 @@ int main(int argc, char *argv[]) {
FLAGS_quic_version = quic_version;
}
}
+ if (line->HasSwitch("flow-control-window-bytes")) {
+ int flow_control_window_bytes;
+ if (base::StringToInt(
+ line->GetSwitchValueASCII("flow-control-window-bytes"),
+ &flow_control_window_bytes)) {
+ FLAGS_flow_control_window_bytes = flow_control_window_bytes;
+ }
+ }
VLOG(1) << "server port: " << FLAGS_port
<< " address: " << FLAGS_address
<< " hostname: " << FLAGS_hostname
@@ -108,6 +120,15 @@ int main(int argc, char *argv[]) {
net::QuicConfig config;
config.SetDefaults();
+ // The default flow control window of 16 Kb is too small for practical
+ // purposes. Set it to the specified value, which has a large default.
+ config.SetInitialFlowControlWindowToSend(
+ FLAGS_flow_control_window_bytes);
+ config.SetInitialStreamFlowControlWindowToSend(
+ FLAGS_flow_control_window_bytes);
+ config.SetInitialSessionFlowControlWindowToSend(
+ FLAGS_flow_control_window_bytes);
+
net::tools::QuicClient client(
net::IPEndPoint(addr, FLAGS_port),
net::QuicServerId(FLAGS_hostname, FLAGS_port, FLAGS_secure,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698