Defines a pointer to the callback function that is called when an asynchronous resolution of a CFHost completes or an error occurs for an asynchronous CFHost resolution.
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
The host for which an asynchronous resolution has been completed.
Value of type
CFHostrepresenting the type of information (addresses, names, or reachability information) obtained by the completed resolution. See
CFHostfor possible values.
If the resolution failed, contains a
errorfield contains an error code.
User-defined context information. The value pointed to by
infois the same as the value pointed to by the
infofield of the
CFHoststructure that was provided when the host was associated with this callback function.
If you name your callback
My, you would declare it like this:
The callback function for a CFHost object is called one or more times when an asynchronous resolution completes for the specified host, when an asynchronous resolution is cancelled, or when an error occurs during an asynchronous resolution.