diff options
Diffstat (limited to 'doc/src/manual/cowboy_loop.asciidoc')
-rw-r--r-- | doc/src/manual/cowboy_loop.asciidoc | 28 |
1 files changed, 2 insertions, 26 deletions
diff --git a/doc/src/manual/cowboy_loop.asciidoc b/doc/src/manual/cowboy_loop.asciidoc index 3f4cfed..605e265 100644 --- a/doc/src/manual/cowboy_loop.asciidoc +++ b/doc/src/manual/cowboy_loop.asciidoc @@ -29,8 +29,6 @@ Loop handlers implement the following interface: init(Req, State) -> {cowboy_loop, Req, State} | {cowboy_loop, Req, State, hibernate} - | {cowboy_loop, Req, State, timeout()} - | {cowboy_loop, Req, State, timeout(), hibernate} info(Info, Req, State) -> {ok, Req, State} @@ -42,7 +40,7 @@ terminate(Reason, Req, State) -> ok %% optional Req :: cowboy_req:req() State :: any() Info :: any() -Reason :: stop | timeout +Reason :: stop | {crash, error | exit | throw, any()} ---- @@ -65,37 +63,15 @@ stop:: The handler requested to close the connection by returning a `stop` tuple. -timeout:: - The connection has been closed due to inactivity. The timeout - value can be configured from `init/2`. The response sent when - this happens is a `204 No Content`. - {crash, Class, Reason}:: A crash occurred in the handler. `Class` and `Reason` can be used to obtain more information about the crash. The function `erlang:get_stacktrace/0` can also be called to obtain the stacktrace of the process when the crash occurred. -//{error, overflow}:: -// The connection is being closed and the process terminated -// because the buffer Cowboy uses to keep data sent by the -// client has reached its maximum. The buffer size can be -// configured through the environment value `loop_max_buffer` -// and defaults to 5000 bytes. -// + -// If the long running request comes with a body it is recommended -// to process this body before switching to the loop sub protocol. -// -//{error, closed}:: -// The socket has been closed brutally without a close frame being -// received first. -// -//{error, Reason}:: -// A socket error ocurred. - == Changelog -* *2.0*: Cowboy temporarily no longer checks the socket for data with HTTP/1.1. +* *2.0*: Loop handlers no longer need to handle overflow/timeouts. * *1.0*: Behavior introduced. == See also |