From 1bf10b3a73509f3fc72fb7f267e767c0e2fa9376 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Wed, 25 Mar 2009 01:52:09 -0700 Subject: Socket: add {snd,rcv}buf opts to bind_listen bind_listen takes a hash as its second parameter now, allowing the addition of :sndbuf and :rcvbuf options to specify the size of the buffers in bytes. These correspond to the SO_SNDBUF and SO_RCVBUF options via setsockopt(2) respectively. This also adds support for per-listener backlogs to be used. However, this is only an internal API change and the changes have not yet been exposed to the user via Unicorn::Configurator, yet. Also add a bunch of SocketHelper tests --- lib/unicorn.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/unicorn.rb') diff --git a/lib/unicorn.rb b/lib/unicorn.rb index eefbfc1..e36cb1e 100644 --- a/lib/unicorn.rb +++ b/lib/unicorn.rb @@ -135,7 +135,7 @@ module Unicorn def listen(address) return if String === address && listener_names.include?(address) - if io = bind_listen(address, @backlog) + if io = bind_listen(address, { :backlog => @backlog }) if Socket == io.class @io_purgatory << io io = server_cast(io) -- cgit v1.2.3-24-ge0c7