class IO::Endpoint::Wrapper

def accept(server, timeout: nil, linger: nil, **options, &block)

Bind to a local address and accept connections in a loop.
def accept(server, timeout: nil, linger: nil, **options, &block)
	while true
		socket, address = server.accept
		
		if linger
			socket.setsockopt(SOL_SOCKET, SO_LINGER, 1)
		end
		
		if timeout
			set_timeout(socket, timeout)
		end
		
		async do
			yield socket, address
		end
	end
end