-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Caching asynchronous DNS resolver. -- -- Caching asynchronous DNS resolver built on top of GNU ADNS -- http://www.chiark.greenend.org.uk/~ian/adns/. -- -- -- -- 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. @package hsdns-cache @version 1.0.3 -- | Caching asynchronous DNS resolver built on top of GNU ADNS -- http://www.chiark.greenend.org.uk/~ian/adns/. -- -- -- -- You should link your program with the threaded runtime-system -- when using this module. In GHC, this is accomplished by specifying -- -threaded 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. module ADNS.Cache -- | Asynchronous DNS cache. data DnsCache -- | Create cache and run action passed. withDnsCache :: (DnsCache -> IO a) -> IO a -- | Wait till all running resolvers are finished and block further -- resolvers. stopDnsCache :: DnsCache -> IO () -- | Resolve A DNS record. resolveA :: DnsCache -> HostName -> IO (Either String HostAddress) -- | Resolve cached A DNS record. Returns Nothing if host name is not yet -- cached. resolveCachedA :: DnsCache -> HostName -> IO (Maybe (Either String HostAddress)) -- | Show HostAddress in standard 123.45.67.89 format. -- -- Unlike inet_ntoa this function is pure and thread-safe. showHostAddress :: HostAddress -> String instance Show a => Show (Queue a)