aboutsummaryrefslogtreecommitdiffstats
path: root/examples/tcp_echo
diff options
context:
space:
mode:
Diffstat (limited to 'examples/tcp_echo')
-rw-r--r--examples/tcp_echo/src/echo_protocol.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/tcp_echo/src/echo_protocol.erl b/examples/tcp_echo/src/echo_protocol.erl
index b54e294..85ea289 100644
--- a/examples/tcp_echo/src/echo_protocol.erl
+++ b/examples/tcp_echo/src/echo_protocol.erl
@@ -3,12 +3,12 @@
-module(echo_protocol).
-export([start_link/4, init/4]).
-start_link(ListenerPid, Socket, Transport, Opts) ->
- Pid = spawn_link(?MODULE, init, [ListenerPid, Socket, Transport, Opts]),
+start_link(Ref, Socket, Transport, Opts) ->
+ Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]),
{ok, Pid}.
-init(ListenerPid, Socket, Transport, _Opts = []) ->
- ok = ranch:accept_ack(ListenerPid),
+init(Ref, Socket, Transport, _Opts = []) ->
+ ok = ranch:accept_ack(Ref),
loop(Socket, Transport).
loop(Socket, Transport) ->