whois-1.2.2: WHOIS client library.

Safe HaskellNone
LanguageHaskell98

Network.Whois

Synopsis

Documentation

data WhoisServer Source

Constructors

WhoisServer 

Fields

hostname :: String
 
port :: Int
 
query :: String
 

serverFor :: String -> Maybe WhoisServer Source

Given an IP address or domain name, attempt to figure out which whois server to use. If we're given a domain name, this is (except in some special cases) usually <tld>.whois-servers.net. If we're given an IP address, we default to a transient server (ARIN), which can give us referral servers to try.

serverFor "192.0.2.123"            -- WhoisServer "whois.arin.net" 43 "n + "

whois :: String -> IO (Maybe String, Maybe String) Source

Returns whois information from the top-level and referral servers.

whois1 :: String -> WhoisServer -> IO (Maybe String) Source

Returns whois information from a particular server.