<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "dnssd",
  "identifier" : "/documentation/dnssd/DNSServiceProcessResult(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "dnssd"
    ],
    "preciseIdentifier" : "c:@F@DNSServiceProcessResult"
  },
  "title" : "DNSServiceProcessResult(_:)"
}
-->

# DNSServiceProcessResult(_:)

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

```
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`](/documentation/dnssd/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(_:)`](/documentation/dnssd/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(_:)`](/documentation/dnssd/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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)