aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_tcp_transport.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-16 13:59:30 +0200
committerLoïc Hoguin <[email protected]>2011-04-16 13:59:30 +0200
commit8f818d79dfe22af8a4a557c1e8676463224b9c22 (patch)
treeedc60a719bb1a4b40cc710ddbe53faadcecb0530 /src/cowboy_tcp_transport.erl
parentd4985dd72be29f6b472d2f7514b88fa20fb061b6 (diff)
downloadcowboy-8f818d79dfe22af8a4a557c1e8676463224b9c22.tar.gz
cowboy-8f818d79dfe22af8a4a557c1e8676463224b9c22.tar.bz2
cowboy-8f818d79dfe22af8a4a557c1e8676463224b9c22.zip
Add an accept timeout for code reloading.
Thought it was already there, but I guess not. Anyway it's here now so everything is back to normal. ;)
Diffstat (limited to 'src/cowboy_tcp_transport.erl')
-rw-r--r--src/cowboy_tcp_transport.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cowboy_tcp_transport.erl b/src/cowboy_tcp_transport.erl
index c1aeabc..5049b84 100644
--- a/src/cowboy_tcp_transport.erl
+++ b/src/cowboy_tcp_transport.erl
@@ -13,7 +13,7 @@
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-module(cowboy_tcp_transport).
--export([name/0, messages/0, listen/1, accept/1, recv/3, send/2, setopts/2,
+-export([name/0, messages/0, listen/1, accept/2, recv/3, send/2, setopts/2,
controlling_process/2, peername/1, close/1]). %% API.
-include("include/types.hrl").
@@ -33,10 +33,10 @@ listen(Opts) ->
gen_tcp:listen(Port, [binary, {active, false},
{packet, raw}, {reuseaddr, true}]).
--spec accept(LSocket::socket())
+-spec accept(LSocket::socket(), Timeout::timeout())
-> {ok, Socket::socket()} | {error, Reason::closed | timeout | posix()}.
-accept(LSocket) ->
- gen_tcp:accept(LSocket).
+accept(LSocket, Timeout) ->
+ gen_tcp:accept(LSocket, Timeout).
-spec recv(Socket::socket(), Length::integer(), Timeout::timeout())
-> {ok, Packet::term()} | {error, Reason::closed | posix()}.