| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Network.DNS.Resolver
Description
Resolver related data types.
Synopsis
- data ResolvConf
- defaultResolvConf :: ResolvConf
- resolvInfo :: ResolvConf -> FileOrNumericHost
- resolvTimeout :: ResolvConf -> Int
- resolvRetry :: ResolvConf -> Int
- resolvConcurrent :: ResolvConf -> Bool
- resolvCache :: ResolvConf -> Maybe CacheConf
- resolvQueryControls :: ResolvConf -> QueryControls
- data FileOrNumericHost
- = RCFilePath FilePath
- | RCHostName HostName
- | RCHostNames [HostName]
- | RCHostPort HostName PortNumber
- data CacheConf
- defaultCacheConf :: CacheConf
- maximumTTL :: CacheConf -> TTL
- pruningDelay :: CacheConf -> Int
- data ResolvSeed
- makeResolvSeed :: ResolvConf -> IO ResolvSeed
- data Resolver
- withResolver :: ResolvSeed -> (Resolver -> IO a) -> IO a
- withResolvers :: [ResolvSeed] -> ([Resolver] -> IO a) -> IO a
Configuration for resolver
data ResolvConf #
Instances
| Show ResolvConf # | |
Defined in Network.DNS.Types.Resolver Methods showsPrec :: Int -> ResolvConf -> ShowS show :: ResolvConf -> String showList :: [ResolvConf] -> ShowS | |
Accessors
resolvTimeout :: ResolvConf -> Int #
resolvRetry :: ResolvConf -> Int #
resolvConcurrent :: ResolvConf -> Bool #
resolvCache :: ResolvConf -> Maybe CacheConf #
Specifying DNS servers
data FileOrNumericHost #
Constructors
| RCFilePath FilePath | |
| RCHostName HostName | |
| RCHostNames [HostName] | |
| RCHostPort HostName PortNumber |
Instances
| Show FileOrNumericHost # | |
Defined in Network.DNS.Types.Resolver Methods showsPrec :: Int -> FileOrNumericHost -> ShowS show :: FileOrNumericHost -> String showList :: [FileOrNumericHost] -> ShowS | |
Configuring cache
maximumTTL :: CacheConf -> TTL #
pruningDelay :: CacheConf -> Int #
Intermediate data type for resolver
data ResolvSeed #
makeResolvSeed :: ResolvConf -> IO ResolvSeed Source #
Type and function for resolver
withResolver :: ResolvSeed -> (Resolver -> IO a) -> IO a Source #
Giving a thread-safe Resolver to the function of the second
argument.
withResolvers :: [ResolvSeed] -> ([Resolver] -> IO a) -> IO a Source #