Commit 51d4e419 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

Cap --window-bits to 26 for QUIC

parent 3912e965
...@@ -2033,7 +2033,7 @@ Options: ...@@ -2033,7 +2033,7 @@ Options:
Default: 1 Default: 1
-w, --window-bits=<N> -w, --window-bits=<N>
Sets the stream level initial window size to (2**<N>)-1. Sets the stream level initial window size to (2**<N>)-1.
For QUIC, <N> is capped to 23 (roughly 8MiB). For QUIC, <N> is capped to 26 (roughly 64MiB).
Default: )" Default: )"
<< config.window_bits << R"( << config.window_bits << R"(
-W, --connection-window-bits=<N> -W, --connection-window-bits=<N>
......
...@@ -367,7 +367,7 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen, ...@@ -367,7 +367,7 @@ int Client::quic_init(const sockaddr *local_addr, socklen_t local_addrlen,
settings.initial_ts = timestamp(worker->loop); settings.initial_ts = timestamp(worker->loop);
auto &params = settings.transport_params; auto &params = settings.transport_params;
auto max_stream_data = auto max_stream_data =
std::min((1 << 23) - 1, (1 << config->window_bits) - 1); std::min((1 << 26) - 1, (1 << config->window_bits) - 1);
params.initial_max_stream_data_bidi_local = max_stream_data; params.initial_max_stream_data_bidi_local = max_stream_data;
params.initial_max_stream_data_uni = max_stream_data; params.initial_max_stream_data_uni = max_stream_data;
params.initial_max_data = (1 << config->connection_window_bits) - 1; params.initial_max_data = (1 << config->connection_window_bits) - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment