diff options
author | Loïc Hoguin <[email protected]> | 2015-02-16 18:03:35 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2015-02-16 18:03:35 +0100 |
commit | 4f2bbd2e5a08e10f98fc82c1f0a98a7c8649b3ee (patch) | |
tree | 0eaa05fc247994ac6f01f51c1979f7b321ca260c /doc/src/guide/sub_protocols.ezdoc | |
parent | 410662b29589214c1d825a027ec6b195c23e3ad6 (diff) | |
parent | 8fd3ff2d629fa13a52061e7db5c67a3ba6fe4429 (diff) | |
download | cowboy-4f2bbd2e5a08e10f98fc82c1f0a98a7c8649b3ee.tar.gz cowboy-4f2bbd2e5a08e10f98fc82c1f0a98a7c8649b3ee.tar.bz2 cowboy-4f2bbd2e5a08e10f98fc82c1f0a98a7c8649b3ee.zip |
Merge branch 'master' of https://github.com/sstrigler/cowboy
Diffstat (limited to 'doc/src/guide/sub_protocols.ezdoc')
-rw-r--r-- | doc/src/guide/sub_protocols.ezdoc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/src/guide/sub_protocols.ezdoc b/doc/src/guide/sub_protocols.ezdoc index d34f21e..54e57aa 100644 --- a/doc/src/guide/sub_protocols.ezdoc +++ b/doc/src/guide/sub_protocols.ezdoc @@ -14,8 +14,8 @@ the name of the sub protocol module. Everything past this point is handled by the sub protocol. ``` erlang -init(Req, Opts) -> - {cowboy_websocket, Req, Opts}. +init(Req, _Opts) -> + {cowboy_websocket, Req, #state{}}. ``` The return value may also have a `Timeout` value and/or the @@ -28,8 +28,8 @@ protocol, sets the timeout value to 5 seconds and enables hibernation: ``` erlang -init(Req, Opts) -> - {my_protocol, Req, Opts, 5000, hibernate}. +init(Req, _Opts) -> + {my_protocol, Req, #state{}, 5000, hibernate}. ``` If a sub protocol does not make use of these options, it should |