CFNetServiceClientCallBack
Defines a pointer to the callback function for a CFNetService.
Declaration
typealias CFNetServiceClientCallBack = (CFNetService, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> VoidParameters
- theService:
CFNetService associated with this callback function.
- error:
Pointer to a doc://com.apple.documentation/documentation/corefoundation/cfstreamerror structure whose
errorfield contain may contain an error code. - info:
User-defined context information. The value of
infois the same as the value of theinfofield of the Cfnetserviceclientcontext structure that was provided when Cfnetservicesetclient(_:_:_:) was called for the CFNetService associated with this callback function.
Discussion
If you name your callback MyNetServiceClientCallBack, you would declare it like this:
Discussion
Your callback function will be called when there are results of resolving a CFNetService to report or when there are registration errors to report. In the case of resolution, if the service has more than one IP address, your callback will be called once for each address.