Displaying 3 results from an estimated 3 matches for "tcp_cork_opts".
2006 Nov 25
3
[PATCH] HTTP accept filter support for FreeBSD
...25 05:19:12 2006
+++ mongrel.rb Sat Nov 25 08:41:20 2006
@@ -666,10 +666,17 @@
end
def configure_socket_options
- if /linux/ === RUBY_PLATFORM
+ case RUBY_PLATFORM
+ when /linux/
# 9 is currently TCP_DEFER_ACCEPT
- $tcp_defer_accept_opts = [9,1]
- $tcp_cork_opts = [3,1]
+ $tcp_defer_accept_opts = [Socket::SOL_TCP, 9, 1]
+ $tcp_cork_opts = [Socket::SOL_TCP, 3, 1]
+ when /freebsd/
+ # Use the HTTP accept filter if available.
+ # The struct made by pack() is defined in /usr/include/sys/socket.h as accept_filter_arg
+ un...
2007 Oct 15
24
Design flaw? - num_processors, accept/close
...ry about
connect timeouts.
while @num_processors < reap_dead_workers
sleep @loop_throttle
end
end
end
720 @acceptor = Thread.new do
721 while true
722 begin
* 723 client = @socket.accept
* 724
725 if $tcp_cork_opts
726 client.setsockopt(*$tcp_cork_opts) rescue nil
727 end
728
729 worker_list = @workers.list
730
731 if worker_list.length >= @num_processors
732 STDERR.puts "Server overloaded with
#{worker_list.l...
2007 Jan 26
2
Attention FreeBSD Gurus
...ering. I completely missed that it calls /sbin/sysctl directly which means I''m slipping on my auditing.
def configure_socket_options
case RUBY_PLATFORM
when /linux/
# 9 is currently TCP_DEFER_ACCEPT
$tcp_defer_accept_opts = [Socket::SOL_TCP, 9, 1]
$tcp_cork_opts = [Socket::SOL_TCP, 3, 1]
when /freebsd/
# Use the HTTP accept filter if available.
# The struct made by pack() is defined in /usr/include/sys/socket.h as accept_filter_arg
unless `/sbin/sysctl -nq net.inet.accf.http`.empty?
$tcp_defer_accept_opts = [Socket::...