Class: LightIO::Library::UNIXServer

Inherits:
UNIXSocket show all
Includes:
Base
Defined in:
lib/lightio/library/socket.rb

Instance Method Summary collapse

Methods included from Base

included, #initialize

Methods inherited from UNIXSocket

#recv_io, #send_io

Methods inherited from BasicSocket

#shutdown

Methods included from Module::BasicSocket::ClassMethods

#for_fd

Methods included from Wrap::IOWrapper

included, #initialize

Methods inherited from IO

#binmode, #lineno, #lineno=, #rewind, #seek, #set_encoding, #to_io

Methods included from Module::IO::ClassMethods

#copy_stream, #open, #pipe, #select

Methods included from IO::IOMethods

#close, #eof, #flush, #getbyte, #getc, #gets, #lightio_initialize, #print, #printf, #puts, #read, #readbyte, #readchar, #readline, #readlines, #readpartial, #wait, #wait_readable, #wait_writable, #write

Instance Method Details

#acceptObject



224
225
226
227
# File 'lib/lightio/library/socket.rb', line 224

def accept
  socket = wait_nonblock(:accept_nonblock)
  UNIXSocket._wrap(socket)
end

#accept_nonblock(*args) ⇒ Object



229
230
231
232
# File 'lib/lightio/library/socket.rb', line 229

def accept_nonblock(*args)
  socket = @obj.accept_nonblock(*args)
  socket.is_a?(Symbol) ? socket : UNIXSocket._wrap(socket)
end

#sys_acceptObject



219
220
221
222
# File 'lib/lightio/library/socket.rb', line 219

def sys_accept
  io_watcher.wait_readable
  @obj.sys_accpet
end