Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Addrinfo#connect_internal

connect_internal(local_addrinfo, timeout=nil) { |socket| ... }

creates a new Socket connected to the address of local_addrinfo.

If local_addrinfo is nil, the address of the socket is not bound.

The timeout specify the seconds for timeout. Errno::ETIMEDOUT is raised when timeout occur.

If a block is given the created socket is yielded for each address.