mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 20:50:24 +00:00
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.
This commit is contained in:
parent
903f6f4c7d
commit
8cbd8c1882
10 changed files with 46 additions and 47 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue