This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

accept_nonblock

        # TCPServer.accept_nonblock

(from ruby core)
---
    tcpserver.accept_nonblock([options]) => tcpsocket

---

Accepts an incoming connection using accept(2) after O_NONBLOCK is set
for the underlying file descriptor. It returns an accepted TCPSocket for
the incoming connection.

### Example
    require 'socket'
    serv = TCPServer.new(2202)
    begin # emulate blocking accept
      sock = serv.accept_nonblock
    rescue IO::WaitReadable, Errno::EINTR
      IO.select([serv])
      retry
    end
    # sock is an accepted socket.

Refer to Socket#accept for the exceptions that may be thrown if the call
to TCPServer#accept_nonblock fails.

TCPServer#accept_nonblock may raise any error corresponding to accept(2)
failure, including Errno::EWOULDBLOCK.

If the exception is Errno::EWOULDBLOCK, Errno::EAGAIN,
Errno::ECONNABORTED, Errno::EPROTO, it is extended by IO::WaitReadable.
So IO::WaitReadable can be used to rescue the exceptions for retrying
accept_nonblock.

By specifying a keyword argument *exception* to `false`, you can
indicate that accept_nonblock should not raise an IO::WaitReadable
exception, but return the symbol `:wait_readable` instead.

### See
*   TCPServer#accept
*   Socket#accept




      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.