foreach(nodename, service, family=nil, socktype=nil, protocol=nil, flags=nil, &block)
Class Public methods
iterates over the list of Addrinfo objects obtained by ::getaddrinfo.
Addrinfo.foreach(nil, 80) {|x| p x } #=> #<Addrinfo: 127.0.0.1:80 TCP (:80)> # #<Addrinfo: 127.0.0.1:80 UDP (:80)> # #<Addrinfo: [::1]:80 TCP (:80)> # #<Addrinfo: [::1]:80 UDP (:80)>
Please login to continue.