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/manual | |
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/manual')
-rw-r--r-- | doc/src/manual/cowboy_loop.ezdoc | 8 | ||||
-rw-r--r-- | doc/src/manual/cowboy_websocket.ezdoc | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/doc/src/manual/cowboy_loop.ezdoc b/doc/src/manual/cowboy_loop.ezdoc index 196cec6..79b96f9 100644 --- a/doc/src/manual/cowboy_loop.ezdoc +++ b/doc/src/manual/cowboy_loop.ezdoc @@ -29,10 +29,10 @@ The connection was closed normally before switching to the loop sub protocol. This typically happens if an `ok` tuple is returned from the `init/2` callback. -: shutdown +: stop The handler requested to close the connection by returning -a `shutdown` tuple. +a `stop` tuple. : timeout @@ -72,7 +72,7 @@ A socket error ocurred. : info(Info, Req, State) -> {ok, Req, State} | {ok, Req, State, hibernate} - | {shutdown, Req, State} + | {stop, Req, State} Types: @@ -85,7 +85,7 @@ Handle the Erlang message received. This function will be called every time an Erlang message has been received. The message can be any Erlang term. -The `shutdown` return value can be used to stop the receive loop, +The `stop` return value can be used to stop the receive loop, typically because a response has been sent. The `hibernate` option will hibernate the process until diff --git a/doc/src/manual/cowboy_websocket.ezdoc b/doc/src/manual/cowboy_websocket.ezdoc index 7311662..8aac4cf 100644 --- a/doc/src/manual/cowboy_websocket.ezdoc +++ b/doc/src/manual/cowboy_websocket.ezdoc @@ -69,10 +69,10 @@ further details. The remote endpoint closed the connection with the given `Code` and `Payload` as the reason. -: shutdown +: stop The handler requested to close the connection, either by returning -a `shutdown` tuple or by sending a `close` frame. +a `stop` tuple or by sending a `close` frame. : timeout @@ -111,7 +111,7 @@ A socket error ocurred. | {ok, Req, State, hibernate} | {reply, OutFrame | [OutFrame], Req, State} | {reply, OutFrame | [OutFrame], Req, State, hibernate} - | {shutdown, Req, State} + | {stop, Req, State} Types: @@ -125,7 +125,7 @@ Handle the data received from the Websocket connection. This function will be called every time data is received from the Websocket connection. -The `shutdown` return value can be used to close the +The `stop` return value can be used to close the connection. A close reply will also result in the connection being closed. @@ -138,7 +138,7 @@ Erlang message. | {ok, Req, State, hibernate} | {reply, OutFrame | [OutFrame], Req, State} | {reply, OutFrame | [OutFrame], Req, State, hibernate} - | {shutdown, Req, State} + | {stop, Req, State} Types: @@ -152,7 +152,7 @@ Handle the Erlang message received. This function will be called every time an Erlang message has been received. The message can be any Erlang term. -The `shutdown` return value can be used to close the +The `stop` return value can be used to close the connection. A close reply will also result in the connection being closed. |