aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2019-05-08 18:32:58 +0200
committerLoïc Hoguin <[email protected]>2019-05-09 10:47:14 +0200
commit34758e99d52f45fcdf86833574ca2972c130bd4d (patch)
tree9a32072d178cf520da32352ab0e3c58beaa77b97 /src
parent6012eee1ba9f56673df16645a9e6d91ae12cdbc0 (diff)
downloadranch-34758e99d52f45fcdf86833574ca2972c130bd4d.tar.gz
ranch-34758e99d52f45fcdf86833574ca2972c130bd4d.tar.bz2
ranch-34758e99d52f45fcdf86833574ca2972c130bd4d.zip
Remove ranch:start_listener/6 and :child_spec/6
Diffstat (limited to 'src')
-rw-r--r--src/ranch.erl20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/ranch.erl b/src/ranch.erl
index e03a8a2..0229163 100644
--- a/src/ranch.erl
+++ b/src/ranch.erl
@@ -15,13 +15,11 @@
-module(ranch).
-export([start_listener/5]).
--export([start_listener/6]).
-export([normalize_opts/1]).
-export([stop_listener/1]).
-export([suspend_listener/1]).
-export([resume_listener/1]).
-export([child_spec/5]).
--export([child_spec/6]).
-export([accept_ack/1]).
-export([handshake/1]).
-export([handshake/2]).
@@ -46,7 +44,7 @@
-export([require/1]).
-export([log/4]).
--deprecated([start_listener/6, child_spec/6, accept_ack/1]).
+-deprecated([accept_ack/1]).
-type max_conns() :: non_neg_integer() | infinity.
-export_type([max_conns/0]).
@@ -80,14 +78,6 @@ start_listener(Ref, Transport, TransOpts0, Protocol, ProtoOpts)
Transport, TransOpts, Protocol, ProtoOpts)))
end.
--spec start_listener(ref(), non_neg_integer(), module(), opts(), module(), any())
- -> supervisor:startchild_ret().
-start_listener(Ref, NumAcceptors, Transport, TransOpts0, Protocol, ProtoOpts)
- when is_integer(NumAcceptors), is_atom(Transport), is_atom(Protocol) ->
- TransOpts = normalize_opts(TransOpts0),
- start_listener(Ref, Transport, TransOpts#{num_acceptors => NumAcceptors},
- Protocol, ProtoOpts).
-
-spec normalize_opts(opts()) -> opts().
normalize_opts(Map) when is_map(Map) ->
Map;
@@ -155,14 +145,6 @@ child_spec(Ref, Transport, TransOpts0, Protocol, ProtoOpts) ->
Ref, Transport, TransOpts, Protocol, ProtoOpts
]}, permanent, infinity, supervisor, [ranch_listener_sup]}.
--spec child_spec(ref(), non_neg_integer(), module(), opts(), module(), any())
- -> supervisor:child_spec().
-child_spec(Ref, NumAcceptors, Transport, TransOpts0, Protocol, ProtoOpts)
- when is_integer(NumAcceptors), is_atom(Transport), is_atom(Protocol) ->
- TransOpts = normalize_opts(TransOpts0),
- child_spec(Ref, Transport, TransOpts#{num_acceptors => NumAcceptors},
- Protocol, ProtoOpts).
-
-spec accept_ack(ref()) -> ok.
accept_ack(Ref) ->
{ok, _} = handshake(Ref),