Class | Rev::DNSResolver |
In: |
lib/rev/dns_resolver.rb
|
Parent: | IOWatcher |
A non-blocking DNS resolver. It provides interfaces for querying both /etc/hosts and nameserves listed in /etc/resolv.conf, or nameservers of your choosing.
Presently the client only supports UDP requests against your nameservers and cannot resolve anything with records larger than 512-bytes. Also, IPv6 is not presently supported.
DNSResolver objects are one-shot. Once they resolve a domain name they automatically detach themselves from the event loop and cannot be used again.
RESOLV_CONF | = | '/etc/resolv.conf' |
HOSTS | = | '/etc/hosts' |
DNS_PORT | = | 53 |
DATAGRAM_SIZE | = | 512 |
TIMEOUT | = | 3 |
RETRIES | = | 4 |
Create a new Rev::Watcher descended object to resolve the given hostname. If you so desire you can also specify a list of nameservers to query. By default the resolver will use nameservers listed in /etc/resolv.conf