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
Creates a new one-shot Multicast DNS (mDNS) resolver.
config_info
can be:
Uses the default mDNS addresses
Must contain :nameserver or :nameserver_port like Resolv::DNS#initialize.
# File resolv.rb, line 2551 def initialize(config_info=nil) if config_info then super({ nameserver_port: Addresses }.merge(config_info)) else super(nameserver_port: Addresses) end 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
# File resolv.rb, line 2567 def each_address(name) name = Resolv::DNS::Name.create(name) return unless name.to_a.last == 'local' super(name) end
Commenting is here to help enhance the documentation. For example, sample code, or clarification of the documentation.
If you are posting code samples in your comments, please wrap them in "<pre><code class="ruby" > ... </code></pre>" markup in order to get syntax highlighting.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file a bug report so that it can be corrected for the next release. Thank you.