Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSNetServiceBrowserMBS class.

NSNetServiceBrowserMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an NSNetServiceBrowser object.

NSNetServiceBrowserMBS.Destructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
The destructor.

NSNetServiceBrowserMBS.searchForBrowsableDomains

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initiates a search for domains visible to the host. This method returns immediately.

didFindDomain:moreComing event is raised for each domain discovered.

Some examples using this method:

NSNetServiceBrowserMBS.searchForRegistrationDomains

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initiates a search for domains in which the host may register services.

This method returns immediately, sending a WillSearch event if the network was ready to initiate the search. Subsequent didFindDomain event is raised for each domain discovered.

Most network service browser clients do not have to use this method—it is sufficient to publish a service with the empty string, which registers it in any available registration domains automatically.

NSNetServiceBrowserMBS.searchForServicesOfType(serviceType as string, domainName as string = "")

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Starts a search for services of a particular type within a specific domain.

serviceType: Type of the service to search for.
domainName: Domain name in which to perform the search.

This method returns immediately, sending a WillSearch event if the network was ready to initiate the search.The delegate receives subsequent didFindService event for each service discovered.

The serviceType argument must contain both the service type and transport layer information. To ensure that the mDNS responder searches for services, rather than hosts, make sure to prefix both the service name and transport layer name with an underscore character (“_”). For example, to search for an HTTP service on TCP, you would use the type string “_http._tcp.“. Note that the period character at the end is required.

The domainName argument can be an explicit domain name, the generic local domain "local." (note trailing period, which indicates an absolute name), or the empty string (""), which indicates the default registration domains. Usually, you pass in an empty string. Note that it is acceptable to use an empty string for the domainName argument when publishing or browsing a service, but do not rely on this for resolution.

Some examples using this method:

NSNetServiceBrowserMBS.stop

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa Networking MBS MacFrameworks Plugin 21.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Halts a currently running search or resolution.

This method sends a DidStop event and causes the browser to discard any pending search results.

The items on this page are in the following plugins: MBS MacFrameworks Plugin.


The biggest plugin in space...