Age | Commit message (Collapse) | Author |
|
|
|
Middlewares allow customizing the request processing.
All existing Cowboy project are incompatible with this commit.
You need to change `{dispatch, Dispatch}` in the protocol options
to `{env, [{dispatch, Dispatch}]}` to fix your code.
|
|
This commit prevents erlang messages from keeping a websocket connection
alive. Previously, the timer was canceled upon any activity. Now, the
timeout is only canceled when actual data is sent from the client. The
handler_loop_timeout/1 function is called from websocket_data/4 instead
of handler_before_loop/4. It is also called after every successful reply
in handler_call/4.
|
|
|
|
|
|
We can now reply empty close, ping and pong frames, or close
frames with a payload.
This means that we can send a frame and then close the connection
in a single operation.
If a close packet is sent, the connection is closed immediately,
even if there was frames that remained to be sent. Cowboy will
silently drop any extra frames in the list given as a reply.
|
|
|
|
Instead of returning {text, Data}, you can now return
[{text, Data}, {text, Data2}, ...].
|
|
As suggested by @prof3ta.
|
|
This is the first of many API incompatible changes.
You have been warned.
|
|
Also update the CHANGELOG and copyright years.
|
|
|
|
|
|
|