aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_tcp_transport.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/cowboy_tcp_transport.erl')
-rw-r--r--src/cowboy_tcp_transport.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_tcp_transport.erl b/src/cowboy_tcp_transport.erl
index 45c87df..49003bd 100644
--- a/src/cowboy_tcp_transport.erl
+++ b/src/cowboy_tcp_transport.erl
@@ -30,8 +30,9 @@ messages() -> {tcp, tcp_closed, tcp_error}.
-> {ok, LSocket::inet:socket()} | {error, Reason::atom()}.
listen(Opts) ->
{port, Port} = lists:keyfind(port, 1, Opts),
+ Backlog = proplists:get_value(backlog, Opts, 128),
gen_tcp:listen(Port, [binary, {active, false},
- {packet, raw}, {reuseaddr, true}]).
+ {backlog, Backlog}, {packet, raw}, {reuseaddr, true}]).
-spec accept(LSocket::inet:socket(), Timeout::timeout())
-> {ok, Socket::inet:socket()}