Skip to content
Browse files

Rename handle_message/2 by handle_open/1.

Signed-off-by: François de Metz <francois@stormz.me>
  • Loading branch information...
1 parent 7472eec commit 8c31b07d1ed9703a13a48d3f308ff0ba4333541e @francois2metz committed
Showing with 4 additions and 3 deletions.
  1. +3 −2 examples/src/basic_echo_callback.erl
  2. +1 −1 src/yaws_websockets.erl
View
5 examples/src/basic_echo_callback.erl
@@ -5,12 +5,13 @@
-module(basic_echo_callback).
%% Export for websocket callbacks
--export([handle_message/1, handle_message/2]).
+-export([handle_open/1, handle_message/1]).
%% Export for apply
-export([say_hi/1]).
-handle_message(open, _Params) ->
+handle_open(_Params) ->
+ io:format("The connection was opened.~n", []),
noreply.
handle_message({text, <<"bye">>}) ->
View
2 src/yaws_websockets.erl
@@ -107,7 +107,7 @@ handshake(Arg, SC, CallbackMod, Opts, Params) ->
% and ssl sockets
{callback, CallbackType} = lists:keyfind(callback, 1, Opts),
- CallbackMod:handle_message(open, Params),
+ CallbackMod:handle_open(Params),
WSState = #ws_state{sock = CliSock,
vsn = ProtocolVersion,

0 comments on commit 8c31b07

Please sign in to comment.
Something went wrong with that request. Please try again.