Class: LightIO::Library::TCPServer

Inherits:
TCPSocket show all
Includes:
Wrap::IOWrapper
Defined in:
lib/lightio/library/socket.rb

Instance Method Summary collapse

Methods included from Wrap::IOWrapper

included, #initialize

Methods included from Wrap::Wrapper

included, #initialize, #method_missing

Methods inherited from BasicSocket

for_fd, #shutdown

Methods inherited from IO

#close, #eof, #getbyte, #getc, #gets, open, pipe, #read, #readbyte, #readchar, #readline, #readlines, #readpartial, select, #to_io

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class LightIO::Wrap::Wrapper

Instance Method Details

#acceptObject

implement ::Socket instance methods



179
180
181
182
# File 'lib/lightio/library/socket.rb', line 179

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

#sys_acceptObject



184
185
186
187
# File 'lib/lightio/library/socket.rb', line 184

def sys_accept
  @io_watcher.wait_readable
  @io.sys_accept
end