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 ac622cbf530c22d87cbf3a3c2beddcafe4a12a09..f743a7dc127213e78a79078b2fb0db7e4395c126 100644 |
--- a/net/tools/quic/quic_client_bin.cc |
+++ b/net/tools/quic/quic_client_bin.cc |
@@ -5,8 +5,10 @@ |
// A binary wrapper for QuicClient. Connects to --hostname via --address |
// on --port and requests URLs specified on the command line. |
// Pass --secure to check the certificates using proof verifier. |
-// Pass --initial_flow_control_window to specify the size of the initial flow |
-// control receive window to advertise to server. |
+// Pass --initial_stream_flow_control_window to specify the size of the initial |
+// stream flow control receive window to advertise to server. |
+// Pass --initial_session_flow_control_window to specify the size of the initial |
+// session flow control receive window to advertise to server. |
// |
// For example: |
// quic_client --address=127.0.0.1 --port=6122 --hostname=www.google.com |
@@ -22,6 +24,7 @@ |
#include "net/base/privacy_mode.h" |
#include "net/quic/quic_protocol.h" |
#include "net/quic/quic_server_id.h" |
+#include "net/tools/epoll_server/epoll_server.h" |
#include "net/tools/quic/quic_client.h" |
// The port the quic client will connect to. |
@@ -29,8 +32,12 @@ int32 FLAGS_port = 6121; |
std::string FLAGS_address = "127.0.0.1"; |
// The hostname the quic client will connect to. |
std::string FLAGS_hostname = "localhost"; |
-// Size of the initial flow control receive window to advertise to server. |
-int32 FLAGS_initial_flow_control_window = 100 * net::kMaxPacketSize; |
+// Size of the initial stream flow control receive window to advertise to |
+// server. |
+int32 FLAGS_initial_stream_flow_control_window = 100 * net::kMaxPacketSize; |
+// Size of the initial session flow control receive window to advertise to |
+// server. |
+int32 FLAGS_initial_session_flow_control_window = 200 * net::kMaxPacketSize; |
// Check the certificates using proof verifier. |
bool FLAGS_secure = false; |
@@ -82,14 +89,20 @@ int main(int argc, char *argv[]) { |
net::QuicConfig config; |
config.SetDefaults(); |
- config.SetInitialFlowControlWindowToSend(FLAGS_initial_flow_control_window); |
+ config.SetInitialFlowControlWindowToSend( |
+ FLAGS_initial_session_flow_control_window); |
+ config.SetInitialStreamFlowControlWindowToSend( |
+ FLAGS_initial_stream_flow_control_window); |
+ config.SetInitialSessionFlowControlWindowToSend( |
+ FLAGS_initial_session_flow_control_window); |
// TODO(rjshade): Set version on command line. |
+ net::EpollServer epoll_server; |
net::tools::QuicClient client( |
net::IPEndPoint(addr, FLAGS_port), |
net::QuicServerId(FLAGS_hostname, FLAGS_port, FLAGS_secure, |
net::PRIVACY_MODE_DISABLED), |
- net::QuicSupportedVersions(), true, config); |
+ net::QuicSupportedVersions(), true, config, &epoll_server); |
client.Initialize(); |