def DNSServiceResolve(flags=0, interfaceIndex=_NO_DEFAULT, name=_NO_DEFAULT, regtype=_NO_DEFAULT, domain=_NO_DEFAULT, callBack=None):
 _NO_DEFAULT.check(interfaceIndex)
 _NO_DEFAULT.check(name)
 _NO_DEFAULT.check(regtype)
 _NO_DEFAULT.check(domain)
 @_DNSServiceResolveReply
 def _callback(sdRef, flags, interfaceIndex, errorCode, fullname, hosttarget, port, txtLen, txtRecord, context):
  if (callBack is not None):
   port = socket.ntohs(port)
   txtRecord = _length_and_void_p_to_string(txtLen, txtRecord)
   callBack(sdRef, flags, interfaceIndex, errorCode, fullname.decode(), hosttarget.decode(), port, txtRecord)
 _global_lock.acquire()
 try:
  sdRef = _DNSServiceResolve(flags, interfaceIndex, name, regtype, domain, _callback, None)
 finally:
  _global_lock.release()
 sdRef._add_callback(_callback)
 return sdRef

def DNSServiceResolve ( flags = 0 , interfaceIndex = _NO_DEFAULT , name = _NO_DEFAULT , regtype = _NO_DEFAULT , domain = _NO_DEFAULT , callBack = None ) : _NO_DEFAULT . check ( interfaceIndex ) _NO_DEFAULT . check ( name ) _NO_DEFAULT . check ( regtype ) _NO_DEFAULT . check ( domain ) @ _DNSServiceResolveReply def _callback ( sdRef , flags , interfaceIndex , errorCode , fullname , hosttarget , port , txtLen , txtRecord , context ) : if ( callBack is not None ) : port = socket . ntohs ( port ) txtRecord = _length_and_void_p_to_string ( txtLen , txtRecord ) callBack ( sdRef , flags , interfaceIndex , errorCode , fullname . decode ( ) , hosttarget . decode ( ) , port , txtRecord ) _global_lock . acquire ( ) try : sdRef = _DNSServiceResolve ( flags , interfaceIndex , name , regtype , domain , _callback , None ) finally : _global_lock . release ( ) sdRef . _add_callback ( _callback ) return sdRef
resolve a service name discovered via dnsservicebrowse() to a target host name .