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

Class IResolverSimple

NonMetaInterface --+
                   |
                  IResolverSimple

Known Subclasses:
IResolver

Method Summary
  getHostByName(self, name, timeout)
Resolve the domain name C{name} into an IP address.

Method Details

getHostByName(self, name, timeout=10)

Resolve the domain name C{name} into an IP address.

@type name: C{str}
@type timeout: C{int}
@rtype: C{Deferred}
@return: The callback of the C{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.

@raise L{TimeoutError<twisted.internet.defer.TimeoutError>}: Raised
    (asynchronously) if the name cannot be resolved within the
    specified timeout period.

Generated by Epydoc 1.1 on Fri Jun 27 03:48:10 2003 http://epydoc.sf.net