aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_transport.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-11-26 14:22:10 +0100
committerLoïc Hoguin <[email protected]>2013-11-26 14:22:10 +0100
commit99242f3342f24f447e487aee6cbf909fcfce9fdb (patch)
tree7174e2ca193efee7a9d8b48959566b44aa56c642 /src/ranch_transport.erl
parent95bb778f57f55e02bd7fe6f86dfbb4f0a94d6ade (diff)
downloadranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.tar.gz
ranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.tar.bz2
ranch-99242f3342f24f447e487aee6cbf909fcfce9fdb.zip
Add accept_ack on all transports and ack_timeout transport option
Doing this in the connection process allows us to free acceptors to start accepting more connections quicker, especially under load.
Diffstat (limited to 'src/ranch_transport.erl')
-rw-r--r--src/ranch_transport.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ranch_transport.erl b/src/ranch_transport.erl
index d557594..5c1153c 100644
--- a/src/ranch_transport.erl
+++ b/src/ranch_transport.erl
@@ -46,7 +46,10 @@
%% Accept connections with the given listening socket.
-callback accept(socket(), timeout())
- -> {ok, socket()} | {error, closed | timeout | atom() | tuple()}.
+ -> {ok, socket()} | {error, closed | timeout | atom()}.
+
+%% Perform post-accept operations on the socket.
+-callback accept_ack(socket(), timeout()) -> ok.
%% Experimental. Open a connection to the given host and port number.
-callback connect(string(), inet:port_number(), opts())