whois-1.1.0: WHOIS client library.

Safe HaskellNone

Network.Whois

Synopsis

Documentation

data WhoisServer Source

Constructors

WhoisServer 

Fields

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

serverFor :: String -> Maybe WhoisServerSource

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" "n + "

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

Returns whois information.

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

Returns whois information from a particular server.