From 704f843054f3ca32941d42972a1c7d1b144d06ad Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 9 May 2011 04:39:54 +0000 Subject: configurator: move validation logic over There's actually no reason we can't have these methods in Rainbows::Configurator where it's easier to document nowadays. --- lib/rainbows/xepoll_thread_spawn/client.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/rainbows/xepoll_thread_spawn') diff --git a/lib/rainbows/xepoll_thread_spawn/client.rb b/lib/rainbows/xepoll_thread_spawn/client.rb index 049d4e1..f8fc191 100644 --- a/lib/rainbows/xepoll_thread_spawn/client.rb +++ b/lib/rainbows/xepoll_thread_spawn/client.rb @@ -1,7 +1,7 @@ # -*- encoding: binary -*- # :stopdoc: module Rainbows::XEpollThreadSpawn::Client - HBUFSIZ = Rainbows.client_header_buffer_size + Rainbows.config!(self, :keepalive_timeout, :client_header_buffer_size) N = Raindrops.new(1) ACCEPTORS = Rainbows::HttpServer::LISTENERS.dup extend Rainbows::WorkerYield @@ -55,7 +55,7 @@ module Rainbows::XEpollThreadSpawn::Client def self.expire return if ((now = Time.now) - @@last_expire) < 1.0 - if (ot = Rainbows.keepalive_timeout) >= 0 + if (ot = KEEPALIVE_TIMEOUT) >= 0 ot = now - ot defer = [] LOCK.synchronize do @@ -85,7 +85,7 @@ module Rainbows::XEpollThreadSpawn::Client end def epoll_run(buf) - case kgio_tryread(HBUFSIZ, buf) + case kgio_tryread(CLIENT_HEADER_BUFFER_SIZE, buf) when :wait_readable return kato_set when String @@ -105,7 +105,7 @@ module Rainbows::XEpollThreadSpawn::Client def pipeline_ready(hp) hp.parse and return true - case buf = kgio_tryread(HBUFSIZ) + case buf = kgio_tryread(CLIENT_HEADER_BUFFER_SIZE) when :wait_readable kato_set return false -- cgit v1.2.3-24-ge0c7