'See L{IHostnameResolver.resolveHostName}
@param resolutionReceiver: see interface
@param hostName: see interface
@param portNumber: see interface
@param addressTypes: see interface
@param transportSemantics: see interface
@return: see interface'

def resolveHostName(self, resolutionReceiver, hostName, portNumber=0, addressTypes=None, transportSemantics='TCP'):

    pool = self._getThreadPool()
    addressFamily = _typesToAF[(_any if (addressTypes is None) else frozenset(addressTypes))]
    socketType = _transportToSocket[transportSemantics]
    def get():
        try:
            return self._getaddrinfo(hostName, portNumber, addressFamily, socketType)
        except gaierror:
            return []
    d = deferToThreadPool(self._reactor, pool, get)
    resolution = HostResolution(hostName)
    resolutionReceiver.resolutionBegan(resolution)
    @d.addCallback
    def deliverResults(result):
        for (family, socktype, proto, cannoname, sockaddr) in result:
            addrType = _afToType[family]
            resolutionReceiver.addressResolved(addrType(_socktypeToType.get(socktype, 'TCP'), *sockaddr))
        resolutionReceiver.resolutionComplete()
    return resolution
