aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/manual
diff options
context:
space:
mode:
authorMichal Piotrowski <[email protected]>2018-09-28 13:43:48 +0200
committerLoïc Hoguin <[email protected]>2018-10-01 14:57:10 +0200
commit87e279322ba8dd86d6d8ab43f90a1b591ef090d1 (patch)
tree629a8ca004235c7b30fb86920ce4960ffeee6eef /doc/src/manual
parentafc6745d3f3070418204cd5ce97adb592129777a (diff)
downloadgun-87e279322ba8dd86d6d8ab43f90a1b591ef090d1.tar.gz
gun-87e279322ba8dd86d6d8ab43f90a1b591ef090d1.tar.bz2
gun-87e279322ba8dd86d6d8ab43f90a1b591ef090d1.zip
Document the protocols option for Websocket
Diffstat (limited to 'doc/src/manual')
-rw-r--r--doc/src/manual/gun.asciidoc14
1 files changed, 11 insertions, 3 deletions
diff --git a/doc/src/manual/gun.asciidoc b/doc/src/manual/gun.asciidoc
index 9f753b4..020c8b3 100644
--- a/doc/src/manual/gun.asciidoc
+++ b/doc/src/manual/gun.asciidoc
@@ -287,7 +287,8 @@ The pid of the process that will receive the response messages.
[source,erlang]
----
ws_opts() :: #{
- compress => boolean()
+ compress => boolean(),
+ protocols => [{binary(), module()}]
}
----
@@ -295,13 +296,20 @@ Configuration for the Websocket protocol.
The default value is given next to the option name:
-compress => boolean()::
+compress (false)::
Whether to enable permessage-deflate compression. This does
not guarantee that compression will be used as it is the
server that ultimately decides. Defaults to false.
-// @todo Document default_protocol, protocols and user_opts.
+protocols ([])::
+
+A non-empty list enables Websocket protocol negotiation. The
+list of protocols will be sent in the sec-websocket-protocol
+request header. The handler module interface is currently
+undocumented and must be set to `gun_ws_h`.
+
+// @todo Document default_protocol and user_opts.
== Changelog