Class: Coolio::UNIXListener

Inherits:
Listener show all
Defined in:
lib/cool.io/listener.rb

Instance Method Summary collapse

Methods inherited from Listener

#close, #fileno, #listen, #on_connection

Methods inherited from IOWatcher

#attach, #detach, #disable, #enable, #on_readable, #on_writable

Methods included from Meta

#event_callback, #watcher_delegate

Methods inherited from Watcher

#attach, #attached?, #detach, #disable, #enable, #enabled?, #evloop

Constructor Details

#initialize(*args) ⇒ UNIXListener

Create a new Coolio::UNIXListener

Accepts the same arguments as UNIXServer.new Optionally, it can also take anyn existing UNIXServer object and create a Coolio::UNIXListener out of it.



105
106
107
108
109
# File 'lib/cool.io/listener.rb', line 105

def initialize(*args)
  s = ::UNIXServer === args.first ? args.first : ::UNIXServer.new(*args)
  s.instance_eval { listen(DEFAULT_BACKLOG) }
  super(s)
end