Class: LightIO::Library::UNIXSocket

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

Direct Known Subclasses

UNIXServer

Instance Method Summary collapse

Methods included from Base

included, #initialize

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

#recv_io(*args) ⇒ Object



206
207
208
209
210
211
212
# File 'lib/lightio/library/socket.rb', line 206

def recv_io(*args)
  io = @obj.recv_io(*args)
  if (wrapper = LightIO.const_get(io.class.to_s))
    return wrapper._wrap(io) if wrapper.respond_to?(:_wrap)
  end
  io
end

#send_io(io) ⇒ Object



201
202
203
204
# File 'lib/lightio/library/socket.rb', line 201

def send_io(io)
  io = io.send(:light_io_raw_obj) if io.is_a?(LightIO::Library::IO)
  @obj.send_io(io)
end