def names_for(ip)
      resolvers.each do |r|
        names = r.getnames(ip)

        return names unless names.nil? || names.empty?
      end

      []
    end
def names_for(ip)
      resolvers.each do |r|
        names = r.getnames(ip)

        return names unless names.nil? || names.empty?
      end

      []
    end
Create resolver

 First the local resolver is used. If environment variable HOSTSRC is
 given this file is used for local name lookup.

 @param [#getnames, #getaddresses] network_resolver
   The resolver which uses a network name server to resolve ip addresses
   and names.

 @param [#getnames, #getaddresses] local_resolver
   The resolver uses /etc/hosts on POSIX-systems and
   C:\Windows\System32\drivers\etc\hosts on Windows-operating systems to
   resolve ip addresses and names.

 First the local resolver is queried. If this raises an error or returns
 nil or [] the network resolver is queried.
 Get names for given ip

 @param [String] ip
   The ip which should be resolved.