Package twisted :: Package internet :: Module interfaces :: Class IResolverSimple
[frames | no frames]

Class IResolverSimple

Interface --+
            |
           IResolverSimple

Known Subclasses:
IResolver

Method Summary
twisted.internet.defer.Deferred getHostByName(self, name, timeout)
Resolve the domain name name into an IP address.

Method Details

getHostByName(self, name, timeout=10)

Resolve the domain name name into an IP address.
Parameters:
name
           (type=str)
timeout
           (type=int)
Returns:
The callback of the Deferred that is returned will be passed a string that represents the IP address of the specified name, or the errback will be called if the lookup times out. If multiple types of address records are associated with the name, A6 records will be returned in preference to AAAA records, which will be returned in preference to A records. If there are multiple records of the type to be returned, one will be selected at random.
           (type=twisted.internet.defer.Deferred)
Raises:
twisted.internet.defer.TimeoutError - Raised (asynchronously) if the name cannot be resolved within the specified timeout period.

Generated by Epydoc 2.0 on Sat May 15 20:07:45 2004 http://epydoc.sf.net