diff options
author | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-11-07 19:22:36 +0200 |
commit | 8cbd8c1882e33380875f2723cad258784ba3a360 (patch) | |
tree | e04ee8ab09bffcfe8c8bab25e509b626dc42be24 /doc/src/guide/ws_handlers.ezdoc | |
parent | 903f6f4c7d7aca0432e8f8ac3c1790e82b1428fd (diff) | |
download | cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.gz cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.tar.bz2 cowboy-8cbd8c1882e33380875f2723cad258784ba3a360.zip |
Rename 'shutdown' close reason and tuples to 'stop'
The 'shutdown' atom has a specific meaning inside OTP. We are
instead going to use 'stop' which is pretty much the equivalent
of what we actually do. 'shutdown' is now reserved for future
special processes implementation.
Diffstat (limited to 'doc/src/guide/ws_handlers.ezdoc')
-rw-r--r-- | doc/src/guide/ws_handlers.ezdoc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/src/guide/ws_handlers.ezdoc b/doc/src/guide/ws_handlers.ezdoc index cb30511..811e021 100644 --- a/doc/src/guide/ws_handlers.ezdoc +++ b/doc/src/guide/ws_handlers.ezdoc @@ -42,7 +42,7 @@ init(Req, _Opts) -> <<"mychat2">>, Req), {ok, Req2, #state{}}; false -> - {shutdown, Req, undefined} + {stop, Req, undefined} end end. ``` @@ -75,7 +75,7 @@ ping or pong frame arrives from the client. Note that in the case of ping and pong frames, no action is expected as Cowboy automatically replies to ping frames. -The handler can decide to send frames to the socket, shutdown +The handler can decide to send frames to the socket, stop or just continue without sending anything. The following snippet echoes back any text frame received and @@ -93,7 +93,7 @@ websocket_handle(_Frame, Req, State) -> Cowboy will call `websocket_info/3` whenever an Erlang message arrives. -The handler can decide to send frames to the socket, shutdown +The handler can decide to send frames to the socket, stop or just continue without sending anything. The following snippet forwards any `log` message to the socket |