0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 20:50:24 +00:00

Add options controlling initial control flow windows

This commit is contained in:
Loïc Hoguin 2018-04-26 22:08:05 +02:00
parent b2f16d462a
commit d38d86c4a9
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
4 changed files with 309 additions and 39 deletions

View file

@ -17,17 +17,19 @@ as a Ranch protocol.
[source,erlang]
----
opts() :: #{
connection_type => worker | supervisor,
enable_connect_protocol => boolean(),
env => cowboy_middleware:env(),
inactivity_timeout => timeout(),
max_concurrent_streams => non_neg_integer() | infinity,
max_decode_table_size => non_neg_integer(),
max_encode_table_size => non_neg_integer(),
middlewares => [module()],
preface_timeout => timeout(),
shutdown_timeout => timeout(),
stream_handlers => [module()]
connection_type => worker | supervisor,
enable_connect_protocol => boolean(),
env => cowboy_middleware:env(),
inactivity_timeout => timeout(),
initial_connection_window_size => 65535..16#7fffffff,
initial_stream_window_size => 0..16#7fffffff,
max_concurrent_streams => non_neg_integer() | infinity,
max_decode_table_size => non_neg_integer(),
max_encode_table_size => non_neg_integer(),
middlewares => [module()],
preface_timeout => timeout(),
shutdown_timeout => timeout(),
stream_handlers => [module()]
}
----
@ -56,6 +58,19 @@ env (#{})::
inactivity_timeout (300000)::
Time in ms with nothing received at all before Cowboy closes the connection.
initial_connection_window_size (65535)::
Initial window size for the connection. This is the total amount
of data (from request bodies for example) that may be buffered
by the connection across all streams before the user code
explicitly requests it.
+
Note that this value cannot be lower than the default.
initial_stream_window_size (65535)::
Initial window size for new streams. This is the total amount
of data (from request bodies for example) that may be buffered
by a single stream before the user code explicitly requests it.
max_concurrent_streams (infinity)::
Maximum number of concurrent streams allowed on the connection.
@ -83,7 +98,8 @@ stream_handlers ([cowboy_stream_h])::
== Changelog
* *2.4*: Add the options `max_concurrent_streams`,
* *2.4*: Add the options `initial_connection_window_size`,
`initial_stream_window_size`, `max_concurrent_streams`,
`max_decode_table_size` and `max_encode_table_size`
to configure HTTP/2 SETTINGS.
* *2.4*: Add the experimental option `enable_connect_protocol`.