Class Dnsruby::SingleResolver
In: lib/Dnsruby/SingleResolver.rb
Parent: Resolver

Dnsruby::SingleResolver

 This class has been deprecated.
 This implementation exists for legacy clients. New code should use the Dnsruby::Resolver class.
 The SingleResolver class targets a single resolver, and controls the sending of a single
 packet with a packet timeout. It performs no retries. Only two threads are used - the client
 thread and a select thread (which is reused across all queries).

Methods

Synchronous

These methods raise an exception or return a response message with rcode==NOERROR

  • Dnsruby::SingleResolver#send_message(msg [, use_tcp]))
  • Dnsruby::SingleResolver#query(name [, type [, klass]])

Asynchronous

These methods use a response queue to return the response and the error to the client. Support for EventMachine has been deprecated

  • Dnsruby::SingleResolver#send_async(...)

Methods

External Aliases

packet_timeout -> query_timeout

Public Class methods

Can take a hash with the following optional keys :

  • :server
  • :port
  • :use_tcp
  • :no_tcp
  • :ignore_truncation
  • :src_address
  • :src_port
  • :udp_size
  • :persistent_tcp
  • :persistent_udp
  • :tsig
  • :packet_timeout
  • :recurse

Public Instance methods

Add the appropriate EDNS OPT RR for the specified packet. This is done automatically, unless you are using Resolver#send_plain_message

query_timeout=(t)

Alias for packet_timeout=

[Validate]