aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_acceptor.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2012-07-25 10:57:00 +0200
committerLoïc Hoguin <[email protected]>2012-07-25 10:57:00 +0200
commit1d2940b37917a9217338caa4dea37890ac5b96d3 (patch)
tree8e3865ad84e5324f73ce203b0b762336bf359ea8 /src/ranch_acceptor.erl
parentb72fe3e67e65c66d979a9651ebc815bdc553601c (diff)
downloadranch-1d2940b37917a9217338caa4dea37890ac5b96d3.tar.gz
ranch-1d2940b37917a9217338caa4dea37890ac5b96d3.tar.bz2
ranch-1d2940b37917a9217338caa4dea37890ac5b96d3.zip
Register acceptors through ranch_server
Diffstat (limited to 'src/ranch_acceptor.erl')
-rw-r--r--src/ranch_acceptor.erl7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ranch_acceptor.erl b/src/ranch_acceptor.erl
index 8de0de7..040145b 100644
--- a/src/ranch_acceptor.erl
+++ b/src/ranch_acceptor.erl
@@ -16,19 +16,20 @@
-module(ranch_acceptor).
%% API.
--export([start_link/6]).
+-export([start_link/7]).
%% Internal.
-export([acceptor/7]).
%% API.
--spec start_link(inet:socket(), module(), module(), any(),
+-spec start_link(any(), inet:socket(), module(), module(), any(),
pid(), pid()) -> {ok, pid()}.
-start_link(LSocket, Transport, Protocol, Opts,
+start_link(Ref, LSocket, Transport, Protocol, Opts,
ListenerPid, ConnsSup) ->
Pid = spawn_link(?MODULE, acceptor,
[LSocket, Transport, Protocol, Opts, 1, ListenerPid, ConnsSup]),
+ ok = ranch_server:add_acceptor(Ref, Pid),
{ok, Pid}.
%% Internal.