Contents

DNSServiceProcessResult(_:)

Reads a reply from the daemon, calling the appropriate application callback.

Declaration

func DNSServiceProcessResult(_ sdRef: DNSServiceRef!) -> DNSServiceErrorType

Parameters

  • sdRef:

    A DNSServiceRef initialized by any of the DNSService calls that take a callback parameter.

Return Value

Returns kDNSServiceErr_NoError on success, otherwise returns an error code indicating the specific failure that occurred.

Discussion

This call blocks until the daemon’s response is received. Use DNSServiceRefSockFD(_:) in conjunction with a run loop or select() to determine the presence of a response from the server before calling this function to process the reply without blocking. Call this function at any point if it is acceptable to block until the daemon’s response arrives. Note that the client is responsible for ensuring that DNSServiceProcessResult(_:) is called whenever there is a reply from the daemon - the daemon may terminate its connection with a client that does not process the daemon’s responses.

See Also

Unix Domain Socket access, DNSServiceRef deallocation, and data processing functions