Caching asynchronous DNS resolver built on top of GNU ADNS http://www.chiark.greenend.org.uk/~ian/adns/.
- Resolves several IP addresses for one host (if available) in round-robin fashion.
- Limits number of parallel requests (so DNS resolving continues to work even under heavy load).
- Errors are cached too (for one minute).
- Handles CNAMEs (
hsdnsreturns error for them).
You should link your program with the threaded runtime-system
when using this module. In GHC, this is accomplished by specifying
on the command-line.
This cache is tested in a long running web-crawler (used in http://bazqux.com) so it should be safe to use it in real world applications.
Wait till all running resolvers are finished and block further resolvers.
Resolve cached A DNS record. Returns Nothing if host name is not yet cached.