From 70522ac15a6a3fbcbe8471dcdfb43baff6fd5902 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 26 Sep 2019 18:19:54 +0200 Subject: Document the cow_http2_machine options The details are not given for now. The best would be to document them in Cowlib and refer to that documentation instead of duplicating the information in both the Gun and Cowboy manuals. --- doc/src/manual/gun.asciidoc | 23 ++++++++++++++++++++--- src/gun.erl | 1 + 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc index 9670e2e..c22f1ef 100644 --- a/doc/src/manual/gun.asciidoc +++ b/doc/src/manual/gun.asciidoc @@ -201,7 +201,26 @@ HTTP version to use. http2_opts() :: #{ closing_timeout => timeout(), flow => pos_integer(), - keepalive => timeout() + keepalive => timeout(), + + %% HTTP/2 state machine configuration. + connection_window_margin_size => 0..16#7fffffff, + connection_window_update_threshold => 0..16#7fffffff, + enable_connect_protocol => boolean(), + initial_connection_window_size => 65535..16#7fffffff, + initial_stream_window_size => 0..16#7fffffff, + max_concurrent_streams => non_neg_integer() | infinity, + max_connection_window_size => 0..16#7fffffff, + max_decode_table_size => non_neg_integer(), + max_encode_table_size => non_neg_integer(), + max_frame_size_received => 16384..16777215, + max_frame_size_sent => 16384..16777215 | infinity, + max_stream_buffer_size => non_neg_integer(), + max_stream_window_size => 0..16#7fffffff, + preface_timeout => timeout(), + settings_timeout => timeout(), + stream_window_margin_size => 0..16#7fffffff, + stream_window_update_threshold => 0..16#7fffffff } ---- @@ -226,8 +245,6 @@ keepalive (5000):: Time between pings in milliseconds. -// @todo Allow and document max_frame_size_sent. - === opts() [source,erlang] diff --git a/src/gun.erl b/src/gun.erl index c596764..a72cc85 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -202,6 +202,7 @@ max_encode_table_size => non_neg_integer(), max_frame_size_received => 16384..16777215, max_frame_size_sent => 16384..16777215 | infinity, + max_stream_buffer_size => non_neg_integer(), max_stream_window_size => 0..16#7fffffff, preface_timeout => timeout(), settings_timeout => timeout(), -- cgit v1.2.3