aboutsummaryrefslogtreecommitdiffstats
path: root/test/ws_SUITE_data/ws_echo_timer.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-10-06 16:51:27 +0200
committerLoïc Hoguin <[email protected]>2019-10-06 16:51:27 +0200
commit3977f2b96fb8cc2164bfe28ee094b3e661a2fad9 (patch)
treeb709721f8f69a4ee87bbfab8359915bfd201bb10 /test/ws_SUITE_data/ws_echo_timer.erl
parent2b3852635115ad0aeeade9aeb88f285cfcd870b1 (diff)
downloadcowboy-3977f2b96fb8cc2164bfe28ee094b3e661a2fad9.tar.gz
cowboy-3977f2b96fb8cc2164bfe28ee094b3e661a2fad9.tar.bz2
cowboy-3977f2b96fb8cc2164bfe28ee094b3e661a2fad9.zip
Document the commands based Websocket interface
The old interface with ok|reply|stop tuples is deprecated.
Diffstat (limited to 'test/ws_SUITE_data/ws_echo_timer.erl')
-rw-r--r--test/ws_SUITE_data/ws_echo_timer.erl12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/ws_SUITE_data/ws_echo_timer.erl b/test/ws_SUITE_data/ws_echo_timer.erl
index 7f37229..8157af3 100644
--- a/test/ws_SUITE_data/ws_echo_timer.erl
+++ b/test/ws_SUITE_data/ws_echo_timer.erl
@@ -12,17 +12,17 @@ init(Req, _) ->
websocket_init(State) ->
erlang:start_timer(1000, self(), <<"websocket_init">>),
- {ok, State}.
+ {[], 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(_Frame, State) ->
- {ok, State}.
+ {[], State}.
websocket_info({timeout, _Ref, Msg}, State) ->
erlang:start_timer(1000, self(), <<"websocket_handle">>),
- {reply, {text, Msg}, State};
+ {[{text, Msg}], State};
websocket_info(_Info, State) ->
- {ok, State}.
+ {[], State}.