|class||Cocoa Networking||MBS MacFrameworks Plugin||21.1||✅ Yes||❌ No||❌ No||✅ Yes||All|
Services can range from standard services, such as HTTP and FTP, to custom services defined by other applications. You can use a network service browser in your code to obtain the list of accessible domains and then to obtain an NSNetServiceMBS object for each discovered service. Each network service browser performs one search at a time, so if you want to perform multiple simultaneous searches, use multiple network service browsers.
A network service browser performs all searches asynchronously using the current run loop to execute the search in the background. Results from a search are returned through the associated delegate object, which your client application must provide. Searching proceeds in the background until the object receives a stop message.
To use an NSNetServiceBrowserMBS object to search for services, use the constructor. Once your object is ready, you begin by gathering the list of accessible domains using either the searchForRegistrationDomains or searchForBrowsableDomains methods. From the list of returned domains, you can pick one and use the searchForServicesOfType method to search for services in that domain.
The NSNetServiceBrowserMBS class provides two ways to search for domains. In most cases, your client should use the searchForRegistrationDomains method to search only for local domains to which the host machine has registration authority. This is the preferred method for accessing domains as it guarantees that the host machine can connect to services in the returned domains. Access to domains outside this list may be more limited.
- 7 events
- event DidFindDomain(domainName as String, moreComing as Boolean)
- event DidFindService(service as NSNetServiceMBS, moreComing as Boolean)
- event DidNotSearch(error as Dictionary)
- event DidRemoveDomain(domainName as String, moreComing as Boolean)
- event DidRemoveService(service as NSNetServiceMBS, moreComing as Boolean)
- event DidStopSearch
- event WillSearch
- 2 properties
- 6 methods
This class has no sub classes.
The items on this page are in the following plugins: MBS MacFrameworks Plugin.
MBS FileMaker blog