Contents

CFNetServiceBrowserClientCallBack

Defines a pointer to the callback function for a CFNetServiceBrowser.

Declaration

typealias CFNetServiceBrowserClientCallBack = (CFNetServiceBrowser, CFOptionFlags, CFTypeRef?, UnsafeMutablePointer<CFStreamError>?, UnsafeMutableRawPointer?) -> Void

Parameters

  • browser:

    The CFNetServiceBrowser associated with this callback function.

  • flags:

    Flags conveying additional information. The kCFNetServiceFlagIsDomain bit is set if domainOrService contains a domain; if this bit is not set, domainOrService contains a CFNetService instance. For additional bit values, see CFNetServiceBrowserClientCallBack 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 error field may contain an error code.

  • info:

    User-defined context information. The value of info is the same as the value of the info field 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(_:_:_:_:).

See Also

Data Types