Searches a domain for services of a specified type.
- iOS 2.0+
- macOS 10.2+
- Mac Catalyst 13.0+
- tvOS 9.0+
The CFNetServiceBrowser, obtained by previously calling
CFNet, that is to perform the search; cannot be
Service Browser Create
The domain to search for the service type; cannot be
NULL. To get the domains that are available for searching, call
Service Browser Search For Domains
The service type to search for; cannot be
NULL. For a list of valid service types, see http://www.iana.org/assignments/port-numbers.
A pointer to a
CFStreamstructure, that, if an error occurs, will be set to the error and the error’s domain and passed to your callback function. Pass
NULLif you don’t want to receive the error that may occur as a result of this particular call.
TRUE if the search was started (asynchronous mode);
FALSE if another search is already in progress for this CFNetServiceBrowser or if an error occurred.
This function searches the specified domain for services that match the specified service type. The search continues until the search is canceled by calling
CFNet. When a match is found, the callback function specified when the CFNetServiceBrowser was created is called and passed an instance of a CFNetService representing the service that was found.
In asynchronous mode, this function returns
TRUE if the search was started. Otherwise, it returns
In synchronous mode, this function blocks until the search is stopped by calling
CFNet from another thread, in which case this function returns
FALSE, or until an error occurs.
This function is thread safe.
For any one CFNetServiceBrowser, only one domain search or one service search can be in progress at the same time.