Class: Resolv::MDNS
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
DNS
|
|
Instance Chain:
self,
DNS
|
|
Inherits: |
Resolv::DNS
|
Defined in: | lib/resolv.rb |
Overview
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
Constant Summary
-
AddressV4 =
Default IPv4 mDNS address
'224.0.0.251'
-
AddressV6 =
Default IPv6 mDNS address
'ff02::fb'
-
Addresses =
Default mDNS addresses
[ [AddressV4, Port], [AddressV6, Port], ]
-
Port =
Default mDNS
Port
5353
DNS - Inherited
Class Method Summary
-
.new(config_info = nil) ⇒ MDNS
constructor
Creates a new one-shot Multicast DNS (mDNS) resolver.
DNS - Inherited
Instance Attribute Summary
DNS - Inherited
#timeouts= | Sets the resolver timeouts. |
Instance Method Summary
-
#each_address(name)
Iterates over all IP addresses for
name
retrieved from the mDNS resolver, provided name ends with “local”.
DNS - Inherited
#close | Closes the DNS resolver. |
#each_address | Iterates over all IP addresses for |
#each_name | Iterates over all hostnames for |
#each_resource | Iterates over all |
#fetch_resource, | |
#getaddress | Gets the IP address of |
#getaddresses | Gets all IP addresses for |
#getname | Gets the hostname for |
#getnames | Gets all hostnames for |
#getresource | Look up the |
#getresources | Looks up all |
Constructor Details
.new(config_info = nil) ⇒ MDNS
Creates a new one-shot Multicast DNS (mDNS) resolver.
config_info
can be:
- nil
-
Uses the default mDNS addresses
- Hash
-
Must contain :nameserver or :nameserver_port like Resolv::DNS#initialize.