Terminates a connection with the daemon and frees memory associated with the DNSServiceRef.
- iOS 9.3+
- macOS 10.11.4+
- Mac Catalyst 13.0+
- tvOS 9.2+
- watchOS 2.2+
A DNSServiceRef initialized by any of the DNSService calls.
Any services or records registered with this DNSServiceRef will be deregistered. Any Browse, Resolve, or Query operations called with this reference will be terminated.
Note: If the reference's underlying socket is used in a run loop or select() call, it should be removed BEFORE
DNSService is called, as this function closes the reference's socket.
Note: If the reference was initialized with
DNSService, any DNSRecordRefs created via this reference will be invalidated by this call - the resource records are deregistered, and their DNSRecordRefs may not be used in subsequent functions. Similarly, if the reference was initialized with
DNSService, and an extra resource record was added to the service via
DNSService, the DNSRecordRef created by the add call is invalidated when this function is called - the DNSRecordRef may not be used in subsequent functions.
Note: This call is to be used only with the DNSServiceRef defined by this API.