0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Document the commands based Websocket interface

The old interface with ok|reply|stop tuples is deprecated.
This commit is contained in:
Loïc Hoguin 2019-10-06 16:51:27 +02:00
parent 2b38526351
commit 3977f2b96f
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764
13 changed files with 108 additions and 81 deletions

View file

@ -26,11 +26,11 @@ init(Req=#{qs := Qs}, State) ->
}}.
websocket_handle({text, Data}, State) ->
{reply, {text, Data}, State};
{[{text, Data}], State};
websocket_handle({binary, Data}, State) ->
{reply, {binary, Data}, State};
{[{binary, Data}], State};
websocket_handle(_, State) ->
{ok, State}.
{[], State}.
websocket_info(_, State) ->
{ok, State}.
{[], State}.