diff options
Diffstat (limited to 'test/active_echo_protocol.erl')
-rw-r--r-- | test/active_echo_protocol.erl | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/active_echo_protocol.erl b/test/active_echo_protocol.erl index 6767141..37dd6db 100644 --- a/test/active_echo_protocol.erl +++ b/test/active_echo_protocol.erl @@ -2,14 +2,14 @@ -behaviour(ranch_protocol). -export([start_link/4]). --export([init/4]). +-export([init/3]). -start_link(Ref, Socket, Transport, Opts) -> - Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]), +start_link(Ref, _Socket, Transport, Opts) -> + Pid = spawn_link(?MODULE, init, [Ref, Transport, Opts]), {ok, Pid}. -init(Ref, Socket, Transport, _Opts = []) -> - ok = ranch:accept_ack(Ref), +init(Ref, Transport, _Opts = []) -> + {ok, Socket} = ranch:handshake(Ref), loop(Socket, Transport). loop(Socket, Transport) -> |