Class: Rev::UNIXServer

Inherits:
Server show all
Defined in:
lib/rev/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 Rev::UNIXServer out of it.

Instance Method Summary collapse

Methods inherited from Server

#fileno

Methods inherited from Listener

#close, #fileno, #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
# File 'lib/rev/server.rb', line 69

def initialize(path, klass = UNIXSocket, *args, &block)
  s = ::UNIXServer === path ? path : ::UNIXServer.new(path)
  super(s, klass, *args, &block)
end