Type Alias


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.


typealias CFHostClientCallBack = (CFHost, CFHostInfoType, UnsafePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> Void



The host for which an asynchronous resolution has been completed.


Value of type CFHostInfoType representing the type of information (addresses, names, or reachability information) obtained by the completed resolution. See CFHostInfoType for possible values.


If the resolution failed, contains a CFStreamError structure whose error field contains an error code.


User-defined context information. The value pointed to by info is the same as the value pointed to by the info field of the CFHostClientContext structure that was provided when the host was associated with this callback function.


If you name your callback MyHostClientCallBack, 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.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software