Class
Resolv::MDNS
is a one-shot Multicast DNS
(mDNS) resolver. It blindly makes queries to the mDNS addresses without understanding anything about multicast ports.
Information taken form the following places:
-
RFC 6762
Constants
Default mDNS addresses
Class Methods
lib/resolv.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/resolv.rb, line 3187
def initialize(config_info=nil)
if config_info then
super({ nameserver_port: Addresses }.merge(config_info))
else
super(nameserver_port: Addresses)
end
end
Instance Methods
lib/resolv.rb
View on GitHub
# File tmp/rubies/ruby-3.4.1/lib/resolv.rb, line 3203
def each_address(name)
name = Resolv::DNS::Name.create(name)
return unless name[-1].to_s == 'local'
super(name)
end
Iterates over all IP addresses for name
retrieved from the mDNS resolver, provided name ends with “local”. If the name does not end in “local” no records will be returned.
name
can be a Resolv::DNS::Name
or a String
. Retrieved addresses will be a Resolv::IPv4
or Resolv::IPv6