From e92171a8f80755dad795691ad9e07807212d0d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Thu, 9 May 2019 10:18:53 +0200 Subject: Use ssl:handshake instead of ssl:ssl_accept This makes Ranch require OTP-21+. The function ranch:accept_ack/1 was also removed in this commit. --- test/accept_ack_protocol.erl | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 test/accept_ack_protocol.erl (limited to 'test/accept_ack_protocol.erl') diff --git a/test/accept_ack_protocol.erl b/test/accept_ack_protocol.erl deleted file mode 100644 index 3c36fc7..0000000 --- a/test/accept_ack_protocol.erl +++ /dev/null @@ -1,22 +0,0 @@ --module(accept_ack_protocol). --behaviour(ranch_protocol). - --export([start_link/4]). --export([init/4]). - -start_link(Ref, Socket, Transport, Opts) -> - Pid = spawn_link(?MODULE, init, [Ref, Socket, Transport, Opts]), - {ok, Pid}. - -init(Ref, Socket, Transport, _Opts = []) -> - ok = ranch:accept_ack(Ref), - loop(Socket, Transport). - -loop(Socket, Transport) -> - case Transport:recv(Socket, 0, 5000) of - {ok, Data} -> - Transport:send(Socket, Data), - loop(Socket, Transport); - _ -> - ok = Transport:close(Socket) - end. -- cgit v1.2.3