vendor/bundle/ruby/2.7.0/gems/dnsruby-1.61.5/lib/dnsruby/resolver.rb
#  Query for a name. If a valid Message is received, then it is returned
#  to the caller. Otherwise an exception (a Dnsruby::ResolvError or Dnsruby::ResolvTimeout) is raised.
#
#    require 'dnsruby'
#    res = Dnsruby::Resolver.new
#    response = res.query('example.com') # defaults to Types.A, Classes.IN
#    response = res.query('example.com', Types.MX)
#    response = res.query('208.77.188.166') # IPv4 address so PTR query will be made
#    response = res.query('208.77.188.166', Types.PTR)
Query for a name. If a valid Message is received, then it is returned
to the caller. Otherwise an exception (a Dnsruby::ResolvError or Dnsruby::ResolvTimeout) is raised.


Query for a name . If a valid Message is received then it is returned to the caller . Otherwise an exception ( a Dnsruby :: ResolvError or Dnsruby :: ResolvTimeout ) is raised .
def query(name, type=Types.A, klass=Classes.IN, set_cd=@dnssec)
      msg = Message.new
      msg.do_caching = @do_caching
      msg.header.rd = 1
      msg.add_question(name, type, klass)
      msg.do_validation = @do_validation
      if @dnssec
        msg.header.cd = set_cd 
      end
      send_message(msg)
    end
def query ( name , type = Types . A , klass = Classes . IN , set_cd = @dnssec ) msg = Message . new msg . do_caching = @do_caching msg . header . rd = 1 msg . add_question ( name , type , klass ) msg . do_validation = @do_validation if @dnssec msg . header . cd = set_cd end send_message ( msg ) end
Query for a name.
Query for a name .
# We do our own validation by default
name
<not_specific>
type
<not_specific>
klass
<not_specific>
set_cd
<not_specific>