aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ranch.erl8
-rw-r--r--src/ranch_ssl.erl14
-rw-r--r--src/ranch_tcp.erl6
3 files changed, 1 insertions, 27 deletions
diff --git a/src/ranch.erl b/src/ranch.erl
index 0229163..4198997 100644
--- a/src/ranch.erl
+++ b/src/ranch.erl
@@ -20,7 +20,6 @@
-export([suspend_listener/1]).
-export([resume_listener/1]).
-export([child_spec/5]).
--export([accept_ack/1]).
-export([handshake/1]).
-export([handshake/2]).
-export([recv_proxy_header/2]).
@@ -44,8 +43,6 @@
-export([require/1]).
-export([log/4]).
--deprecated([accept_ack/1]).
-
-type max_conns() :: non_neg_integer() | infinity.
-export_type([max_conns/0]).
@@ -145,11 +142,6 @@ child_spec(Ref, Transport, TransOpts0, Protocol, ProtoOpts) ->
Ref, Transport, TransOpts, Protocol, ProtoOpts
]}, permanent, infinity, supervisor, [ranch_listener_sup]}.
--spec accept_ack(ref()) -> ok.
-accept_ack(Ref) ->
- {ok, _} = handshake(Ref),
- ok.
-
-spec handshake(ref()) -> {ok, ranch_transport:socket()}.
handshake(Ref) ->
handshake(Ref, []).
diff --git a/src/ranch_ssl.erl b/src/ranch_ssl.erl
index 8ab71e7..2b246f7 100644
--- a/src/ranch_ssl.erl
+++ b/src/ranch_ssl.erl
@@ -15,17 +15,12 @@
-module(ranch_ssl).
-behaviour(ranch_transport).
--ifdef(OTP_RELEASE).
--compile({nowarn_deprecated_function, [{ssl, ssl_accept, 3}]}).
--endif.
-
-export([name/0]).
-export([secure/0]).
-export([messages/0]).
-export([listen/1]).
-export([disallowed_listen_options/0]).
-export([accept/2]).
--export([accept_ack/2]).
-export([handshake/3]).
-export([connect/3]).
-export([connect/4]).
@@ -131,17 +126,10 @@ disallowed_listen_options() ->
accept(LSocket, Timeout) ->
ssl:transport_accept(LSocket, Timeout).
--spec accept_ack(ssl:sslsocket(), timeout()) -> ok.
-accept_ack(CSocket, Timeout) ->
- {ok, _} = handshake(CSocket, [], Timeout),
- ok.
-
-spec handshake(inet:socket() | ssl:sslsocket(), opts(), timeout())
-> {ok, ssl:sslsocket()} | {error, any()}.
handshake(CSocket, Opts, Timeout) ->
- case ssl:ssl_accept(CSocket, Opts, Timeout) of
- ok ->
- {ok, CSocket};
+ case ssl:handshake(CSocket, Opts, Timeout) of
{ok, NewSocket} ->
{ok, NewSocket};
Error = {error, _} ->
diff --git a/src/ranch_tcp.erl b/src/ranch_tcp.erl
index 365af26..129202d 100644
--- a/src/ranch_tcp.erl
+++ b/src/ranch_tcp.erl
@@ -21,7 +21,6 @@
-export([listen/1]).
-export([disallowed_listen_options/0]).
-export([accept/2]).
--export([accept_ack/2]).
-export([handshake/3]).
-export([connect/3]).
-export([connect/4]).
@@ -101,11 +100,6 @@ disallowed_listen_options() ->
accept(LSocket, Timeout) ->
gen_tcp:accept(LSocket, Timeout).
--spec accept_ack(inet:socket(), timeout()) -> ok.
-accept_ack(CSocket, Timeout) ->
- {ok, _} = handshake(CSocket, [], Timeout),
- ok.
-
-spec handshake(inet:socket(), opts(), timeout()) -> {ok, inet:socket()}.
handshake(CSocket, _, _) ->
{ok, CSocket}.