Class: LightIO::Library::Socket
- Inherits:
-
BasicSocket
- Object
- IO
- BasicSocket
- LightIO::Library::Socket
- Extended by:
- Module::Socket::ClassMethods
- Includes:
- Base, Wrap::IOWrapper, Socket::Constants
- Defined in:
- lib/lightio/library/socket.rb
Defined Under Namespace
Classes: Ifaddr
Constant Summary collapse
- Option =
::Socket::Option
- UDPSource =
::Socket::UDPSource
- SocketError =
::SocketError
- Addrinfo =
Addrinfo
Instance Method Summary collapse
Methods included from Module::Socket::ClassMethods
getaddrinfo, getifaddrs, ip_sockets_port0, socketpair, unix_server_socket
Methods included from Wrap::IOWrapper
Methods included from Base
Methods inherited from BasicSocket
Methods included from Module::BasicSocket::ClassMethods
Methods inherited from IO
Methods included from Module::IO::ClassMethods
Methods included from IO::IOMethods
#close, #eof, #getbyte, #getc, #gets, included, #print, #printf, #puts, #read, #readbyte, #readchar, #readline, #readlines, #readpartial, #wait, #wait_readable, #wait_writable
Instance Method Details
#accept ⇒ Object
116 117 118 119 |
# File 'lib/lightio/library/socket.rb', line 116 def accept socket, addrinfo = wait_nonblock(:accept_nonblock) [self.class._wrap(socket), Addrinfo._wrap(addrinfo)] end |
#accept_nonblock(*args) ⇒ Object
121 122 123 124 125 126 127 128 |
# File 'lib/lightio/library/socket.rb', line 121 def accept_nonblock(*args) socket, addrinfo = @obj.accept_nonblock(*args) if socket.is_a?(Symbol) [socket, nil] else [self.class._wrap(socket), Addrinfo._wrap(addrinfo)] end end |
#sys_accept ⇒ Object
84 85 86 87 |
# File 'lib/lightio/library/socket.rb', line 84 def sys_accept io_watcher.wait_readable @obj.sys_accept end |