diff options
Diffstat (limited to 'doc/src/guide/ws_handlers.ezdoc')
-rw-r--r-- | doc/src/guide/ws_handlers.ezdoc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/src/guide/ws_handlers.ezdoc b/doc/src/guide/ws_handlers.ezdoc index cb30511..9f0fcbb 100644 --- a/doc/src/guide/ws_handlers.ezdoc +++ b/doc/src/guide/ws_handlers.ezdoc @@ -16,8 +16,8 @@ to all handlers. To establish a Websocket connection, this function must return a `ws` tuple. ``` erlang -init(Req, Opts) -> - {cowboy_websocket, Req, Opts}. +init(Req, _Opts) -> + {cowboy_websocket, Req, #state{}}. ``` Upon receiving this tuple, Cowboy will switch to the code |