Class: Coolio::UNIXServer
- Defined in:
- lib/cool.io/server.rb
Overview
UNIX server class. Listens on the specified UNIX domain socket and creates new connection objects of the given class. Optionally, it can also take any existing core UNIXServer object as path
and create a Coolio::UNIXServer out of it.
Instance Method Summary collapse
-
#initialize(path, klass = UNIXSocket, *args, &block) ⇒ UNIXServer
constructor
A new instance of UNIXServer.
Methods inherited from Server
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(path, klass = UNIXSocket, *args, &block) ⇒ UNIXServer
Returns a new instance of UNIXServer.
69 70 71 72 73 |
# File 'lib/cool.io/server.rb', line 69 def initialize(path, klass = UNIXSocket, *args, &block) s = ::UNIXServer === path ? path : ::UNIXServer.new(path) s.instance_eval { listen(DEFAULT_BACKLOG) } super(s, klass, *args, &block) end |