socket.connect_nonblock(remote_sockaddr) => 0
Instance Public methods
Requests a connection to be made on the given remote_sockaddr
after O_NONBLOCK is set for the underlying file descriptor. Returns 0 if
successful, otherwise an exception is raised.
Parameter
remote_sockaddr - the struct sockaddr contained
in a string or Addrinfo object
Example:
# Pull down Google's web page
require 'socket'
include Socket::Constants
socket = Socket.new(AF_INET, SOCK_STREAM, 0)
sockaddr = S