socket.accept_nonblock => [client_socket, client_addrinfo]
Instance Public methods
Accepts an incoming connection using accept(2) after O_NONBLOCK is set for
the underlying file descriptor. It returns an array containing the accepted
socket for the incoming connection, client_socket, and an Addrinfo, client_addrinfo.
Example
# In one script, start this first
require 'socket'
include Socket::Constants
socket = Socket.new(AF_INET, SOCK_STREAM, 0)
sockaddr = Socket.sockaddr_in(220