From d38d86c4a93340b1dd2633e1649c257e3f160d63 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= <essen@ninenines.eu>
Date: Thu, 26 Apr 2018 22:08:05 +0200
Subject: Add options controlling initial control flow windows

---
 doc/src/manual/cowboy_http2.asciidoc | 40 +++++++++++++++++++++++++-----------
 1 file changed, 28 insertions(+), 12 deletions(-)

(limited to 'doc/src/manual/cowboy_http2.asciidoc')

diff --git a/doc/src/manual/cowboy_http2.asciidoc b/doc/src/manual/cowboy_http2.asciidoc
index 4c47fea..7151eb0 100644
--- a/doc/src/manual/cowboy_http2.asciidoc
+++ b/doc/src/manual/cowboy_http2.asciidoc
@@ -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`.
-- 
cgit v1.2.3

