summaryrefslogtreecommitdiffstats
path: root/examples/clock/src/stream_handler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/clock/src/stream_handler.erl')
-rw-r--r--examples/clock/src/stream_handler.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/clock/src/stream_handler.erl b/examples/clock/src/stream_handler.erl
index 2f08342..72efa6f 100644
--- a/examples/clock/src/stream_handler.erl
+++ b/examples/clock/src/stream_handler.erl
@@ -15,8 +15,8 @@ init(_Transport, Req, _Opts, _Active) ->
TRef = erlang:send_after(?PERIOD, self(), refresh),
{ok, Req, TRef}.
-stream(<<"ping">>, Req, State) ->
- io:format("ping received~n"),
+stream(<<"ping: ", Name/binary>>, Req, State) ->
+ io:format("ping ~p received~n", [Name]),
{reply, <<"pong">>, Req, State};
stream(Data, Req, State) ->
io:format("stream received ~s~n", [Data]),