aboutsummaryrefslogtreecommitdiffstats
path: root/doc/src/guide/ws_handlers.ezdoc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/src/guide/ws_handlers.ezdoc')
-rw-r--r--doc/src/guide/ws_handlers.ezdoc6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/guide/ws_handlers.ezdoc b/doc/src/guide/ws_handlers.ezdoc
index 893624b..cb30511 100644
--- a/doc/src/guide/ws_handlers.ezdoc
+++ b/doc/src/guide/ws_handlers.ezdoc
@@ -17,7 +17,7 @@ must return a `ws` tuple.
``` erlang
init(Req, Opts) ->
- {ws, Req, Opts}.
+ {cowboy_websocket, Req, Opts}.
```
Upon receiving this tuple, Cowboy will switch to the code
@@ -61,7 +61,7 @@ or enabling timers.
init(Req, _Opts) ->
self() ! post_init,
%% Register process here...
- {ws, Req, #state{}}.
+ {cowboy_websocket, Req, #state{}}.
websocket_info(post_init, Req, State) ->
%% Perform post_init initialization here...
@@ -161,7 +161,7 @@ A good timeout value is 60 seconds.
``` erlang
init(Req, _Opts) ->
- {ws, Req, #state{}, 60000}.
+ {cowboy_websocket, Req, #state{}, 60000}.
```
This value cannot be changed once it is set. It defaults to