aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual/cowboy_http2.asciidoc
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-05-05 13:48:25 +0200
committerLoïc Hoguin <[email protected]>2017-05-05 13:48:25 +0200
commit7db724f04a0a8468424960790d8414aa374b249e (patch)
treec0f728b7752c7c9111d1f0999f5b2c3e2d0d86f1 /doc/src/manual/cowboy_http2.asciidoc
parent6100470c900d395e8000114df12e7f03e09d6183 (diff)
downloadcowboy-7db724f04a0a8468424960790d8414aa374b249e.tar.gz
cowboy-7db724f04a0a8468424960790d8414aa374b249e.tar.bz2
cowboy-7db724f04a0a8468424960790d8414aa374b249e.zip
Add inactivity_timeout and other options improvements
Diffstat (limited to 'doc/src/manual/cowboy_http2.asciidoc')
-rw-r--r--doc/src/manual/cowboy_http2.asciidoc25
1 files changed, 22 insertions, 3 deletions
diff --git a/doc/src/manual/cowboy_http2.asciidoc b/doc/src/manual/cowboy_http2.asciidoc
index d82bc76..d966459 100644
--- a/doc/src/manual/cowboy_http2.asciidoc
+++ b/doc/src/manual/cowboy_http2.asciidoc
@@ -11,12 +11,19 @@ as a Ranch protocol.
== Options
+// @todo Might be worth moving cowboy_clear/tls/stream_h options
+// to their respective manual, when they are added.
+
[source,erlang]
----
opts() :: #{
- env := cowboy_middleware:env(),
- middlewares := [module()],
- preface_timeout := timeout()
+ connection_type => worker | supervisor,
+ env => cowboy_middleware:env(),
+ inactivity_timeout => timeout(),
+ middlewares => [module()],
+ preface_timeout => timeout(),
+ shutdown_timeout => timeout(),
+ stream_handlers => [module()]
}
----
@@ -31,15 +38,27 @@ Ranch functions `ranch:get_protocol_options/1` and
The default value is given next to the option name:
+connection_type (supervisor)::
+ Whether the connection process also acts as a supervisor.
+
env (#{})::
Middleware environment.
+inactivity_timeout (300000)::
+ Time in ms with nothing received at all before Cowboy closes the connection.
+
middlewares ([cowboy_router, cowboy_handler])::
Middlewares to run for every request.
preface_timeout (5000)::
Time in ms Cowboy is willing to wait for the connection preface.
+shutdown_timeout (5000)::
+ Time in ms Cowboy will wait for child processes to shut down before killing them.
+
+stream_handlers ([cowboy_stream_h])::
+ Ordered list of stream handlers that will handle all stream events.
+
== Changelog
* *2.0*: Protocol introduced.