doc: misc cleanups and additions for RDoc
[rainbows.git] / lib / rainbows / rev.rb
blob1e425fe90bdb248a177dcceedd8bdd50e5003ceb
1 # -*- encoding: binary -*-
2 begin
3   require 'coolio'
4   Coolio::VERSION >= '1.0.0' or abort 'cool.io >= 1.0.0 is required'
5 rescue LoadError
6   require 'rev'
7   Rev::VERSION >= '0.3.0' or abort 'rev >= 0.3.0 is required'
8 end
9 require 'rev' if defined?(Coolio)
11 # Coolio is the new version of this, use that instead.
13 # Implements a basic single-threaded event model with
14 # {Rev}[http://rev.rubyforge.org/].  It is capable of handling
15 # thousands of simultaneous client connections, but with only a
16 # single-threaded app dispatch.  It is suited for slow clients and
17 # fast applications (applications that do not have slow network
18 # dependencies) or applications that use DevFdResponse for deferrable
19 # response bodies.  It does not require your Rack application to be
20 # thread-safe, reentrancy is only required for the DevFdResponse body
21 # generator.
23 # Compatibility: Whatever \Rev itself supports, currently Ruby
24 # 1.8/1.9.
26 # This model does not implement as streaming "rack.input" which
27 # allows the Rack application to process data as it arrives.  This
28 # means "rack.input" will be fully buffered in memory or to a
29 # temporary file before the application is entered.
31 module Rainbows::Rev
32   # :stopdoc:
33   # keep-alive timeout scoreboard
34   KATO = {}
36   # all connected clients
37   CONN = {}
39   if {}.respond_to?(:compare_by_identity)
40     CONN.compare_by_identity
41     KATO.compare_by_identity
42   end
44   autoload :Master, 'rainbows/rev/master'
45   autoload :ThreadClient, 'rainbows/rev/thread_client'
46   autoload :DeferredChunkResponse, 'rainbows/rev/deferred_chunk_response'
47   # :startdoc:
48 end
49 # :enddoc:
50 require 'rainbows/rev/heartbeat'
51 require 'rainbows/rev/server'
52 require 'rainbows/rev/core'
53 require 'rainbows/rev/deferred_response'
54 require 'rainbows/rev/client'
55 Rainbows::Rev.__send__ :include, Rainbows::Rev::Core