mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Add initial implementation of Websocket over HTTP/2
Using the current draft: https://tools.ietf.org/html/draft-ietf-httpbis-h2-websockets-01
This commit is contained in:
parent
a7b06f2e13
commit
bbfc1569cc
6 changed files with 622 additions and 79 deletions
|
@ -17,13 +17,14 @@ as a Ranch protocol.
|
|||
[source,erlang]
|
||||
----
|
||||
opts() :: #{
|
||||
connection_type => worker | supervisor,
|
||||
env => cowboy_middleware:env(),
|
||||
inactivity_timeout => timeout(),
|
||||
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(),
|
||||
middlewares => [module()],
|
||||
preface_timeout => timeout(),
|
||||
shutdown_timeout => timeout(),
|
||||
stream_handlers => [module()]
|
||||
}
|
||||
----
|
||||
|
||||
|
@ -41,6 +42,10 @@ The default value is given next to the option name:
|
|||
connection_type (supervisor)::
|
||||
Whether the connection process also acts as a supervisor.
|
||||
|
||||
enable_connect_protocol (false)::
|
||||
Whether to enable the extended CONNECT method to allow
|
||||
protocols like Websocket to be used over an HTTP/2 stream.
|
||||
|
||||
env (#{})::
|
||||
Middleware environment.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue