diff options
author | Loïc Hoguin <[email protected]> | 2013-11-26 14:22:10 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-11-26 14:22:10 +0100 |
commit | 99242f3342f24f447e487aee6cbf909fcfce9fdb (patch) | |
tree | 7174e2ca193efee7a9d8b48959566b44aa56c642 /src/ranch_tcp.erl | |
parent | 95bb778f57f55e02bd7fe6f86dfbb4f0a94d6ade (diff) | |
download | ranch-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_tcp.erl')
-rw-r--r-- | src/ranch_tcp.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ranch_tcp.erl b/src/ranch_tcp.erl index 087cf09..86b1e35 100644 --- a/src/ranch_tcp.erl +++ b/src/ranch_tcp.erl @@ -24,6 +24,7 @@ -export([messages/0]). -export([listen/1]). -export([accept/2]). +-export([accept_ack/2]). -export([connect/3]). -export([recv/3]). -export([send/2]). @@ -89,6 +90,10 @@ listen(Opts) -> accept(LSocket, Timeout) -> gen_tcp:accept(LSocket, Timeout). +-spec accept_ack(inet:socket(), timeout()) -> ok. +accept_ack(_, _) -> + ok. + %% @private Experimental. Open a connection to the given host and port number. %% @see gen_tcp:connect/3 %% @todo Probably filter Opts? |