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
.new | Creates a new |
.open | Creates a new |
.allocate_request_id, .bind_random_port, .free_request_id, .random |
Instance Attribute Summary
DNS
- Inherited
#timeouts= | Sets the resolver timeouts. |
#use_ipv6? |
Instance Method Summary
-
#each_address(name)
Iterates over all IP addresses for
name
retrieved from the mDNS resolver, provided name ends with “local”. - #make_udp_requester Internal use only
DNS
- Inherited
#close | Closes the |
#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 |
#extract_resources, #lazy_initialize, #make_tcp_requester, #make_udp_requester |
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.
Instance Method Details
#each_address(name)
#make_udp_requester
# File 'lib/resolv.rb', line 2665
def make_udp_requester # :nodoc: nameserver_port = @config.nameserver_port Requester::MDNSOneShot.new(*nameserver_port) end