Class: Net::DNS::MDNS::Query
- Inherits:
-
Object
- Object
- Net::DNS::MDNS::Query
- Includes:
- QueryImp
- Defined in:
- lib/net/dns/mdns.rb
Overview
An mDNS query.
Constant Summary
Constants included from Net::DNS
DecodeError, Net::DNS::Message, Name
Instance Attribute Summary
Attributes included from QueryImp
Instance Method Summary collapse
-
#initialize(name, type = IN::ANY) ⇒ Query
constructor
Query for resource records of
type
for thename
.
Methods included from QueryImp
#each, #initialize_, #length, #pop, #push, #stop, #subscribes_to?, #to_s
Methods included from Net::DNS
Constructor Details
#initialize(name, type = IN::ANY) ⇒ Query
Query for resource records of type
for the name
. type
is one of the constants in Net::DNS::IN, such as A or ANY. name
is a DNS Name or String, see Name.create.
name
can also be the wildcard “*”. This will cause no queries to be multicast, but will return every answer seen by the responder.
If the optional block is provided, self and any answers are yielded until an explicit break, return, or #stop is done.
920 921 922 923 924 925 926 927 928 |
# File 'lib/net/dns/mdns.rb', line 920 def initialize(name, type = IN::ANY) # :yield: self, answers initialize_(name, type) if block_given? self.each do |*args| yield self, args end end end |