CFNetServiceBrowserClientCallBack
Defines a pointer to the callback function for a CFNetServiceBrowser.
Declaration
typealias CFNetServiceBrowserClientCallBack = (CFNetServiceBrowser, CFOptionFlags, CFTypeRef?, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> VoidParameters
- browser:
The CFNetServiceBrowser associated with this callback function.
- flags:
Flags conveying additional information. The
kCFNetServiceFlagIsDomainbit is set ifdomainOrServicecontains a domain; if this bit is not set,domainOrServicecontains a CFNetService instance. For additional bit values, seeCFNetServiceBrowserClientCallBack Bit Flags. - domainOrService:
A string containing a domain name if this callback function is being called as a result of calling Cfnetservicebrowsersearchfordomains(_:_:_:), or a CFNetService instance if this callback function is being called as a result calling Cfnetservicebrowsersearchforservices(_:_:_:_:).
- error:
A pointer to a doc://com.apple.documentation/documentation/corefoundation/cfstreamerror structure whose
errorfield 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 Cfnetservicebrowsercreate(_:_:_:) was called to create the CFNetServiceBrowser associated with this callback function.
Discussion
If you name your callback MyNetServiceBrowserClientCallBack, you would declare it like this:
Discussion
The callback function for a CFNetServiceBrowser is called one or more times when domains or services are found as the result of calling CFNetServiceBrowserSearchForDomains(_:_:_:) and CFNetServiceBrowserSearchForServices(_:_:_:_:).