opts() :: #{ connection_type => worker | supervisor, env => cowboy_middleware:env(), inactivity_timeout => timeout(), middlewares => [module()], preface_timeout => timeout(), shutdown_timeout => timeout(), stream_handlers => [module()] }
cowboy_http2 - HTTP/2
The module cowboy_http2
implements HTTP/2
as a Ranch protocol.
opts() :: #{ connection_type => worker | supervisor, env => cowboy_middleware:env(), inactivity_timeout => timeout(), middlewares => [module()], preface_timeout => timeout(), shutdown_timeout => timeout(), stream_handlers => [module()] }
Configuration for the HTTP/2 protocol.
This configuration is passed to Cowboy when starting listeners
using cowboy:start_clear/3
or cowboy:start_tls/3
functions.
It can be updated without restarting listeners using the
Ranch functions ranch:get_protocol_options/1
and
ranch:set_protocol_options/2
.
The default value is given next to the option name:
Whether the connection process also acts as a supervisor.
Middleware environment.
Time in ms with nothing received at all before Cowboy closes the connection.
Middlewares to run for every request.
Time in ms Cowboy is willing to wait for the connection preface.
Time in ms Cowboy will wait for child processes to shut down before killing them.
Ordered list of stream handlers that will handle all stream events.
2.0: Protocol introduced.