t0050: improve diagnostics for this test
[rainbows.git] / lib / rainbows / coolio / server.rb
blob0d8af8ca36c790b47874c5c6339585f682decc68
1 # -*- encoding: binary -*-
2 # :enddoc:
3 class Rainbows::Coolio::Server < Coolio::IO
4   CONN = Rainbows::Coolio::CONN
5   # CL and MAX will be defined in the corresponding worker loop
7   def on_readable
8     return if CONN.size >= MAX
9     io = @_io.kgio_tryaccept and CL.new(io).attach(LOOP)
10   end
11 end