diff options
author | Loïc Hoguin <[email protected]> | 2016-05-24 14:50:27 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2016-05-24 14:50:27 +0200 |
commit | b5a40256ddd5585d12c2a01771eb93d4a8630a62 (patch) | |
tree | 9d03e630d501852b216a8b7990a1d03a02e9f4dd /doc/src/guide/loop_handlers.asciidoc | |
parent | 25912dfc05e45e0f4453f689410fce80a1af69ab (diff) | |
download | cowboy-b5a40256ddd5585d12c2a01771eb93d4a8630a62.tar.gz cowboy-b5a40256ddd5585d12c2a01771eb93d4a8630a62.tar.bz2 cowboy-b5a40256ddd5585d12c2a01771eb93d4a8630a62.zip |
Partial update of the user guide
I will do more breaking changes before documenting more.
Diffstat (limited to 'doc/src/guide/loop_handlers.asciidoc')
-rw-r--r-- | doc/src/guide/loop_handlers.asciidoc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/doc/src/guide/loop_handlers.asciidoc b/doc/src/guide/loop_handlers.asciidoc index 58c4223..d3655e5 100644 --- a/doc/src/guide/loop_handlers.asciidoc +++ b/doc/src/guide/loop_handlers.asciidoc @@ -1,6 +1,8 @@ [[loop_handlers]] == Loop handlers +// @todo This description needs to be updated. + Loop handlers are a special kind of HTTP handlers used when the response can not be sent right away. The handler enters instead a receive loop waiting for the right message before it can send @@ -64,8 +66,8 @@ message otherwise. [source,erlang] ---- info({reply, Body}, Req, State) -> - Req2 = cowboy_req:reply(200, [], Body, Req), - {stop, Req2, State}; + cowboy_req:reply(200, [], Body, Req), + {stop, Req, State}; info(_Msg, Req, State) -> {ok, Req, State, hibernate}. ---- |