The NSNetService class represents a network service, either one your application publishes or is a client of. Available in OS X v10.2 and later with Apple's Foundation framework.
The methods of NSNetService operate asynchronously so your application is not impacted by the speed of the network. All information about a service is returned to your application through the NSNetService object’s delegate. You must provide a delegate object to respond to messages and to handle errors appropriately.
NSNetService class and the NSNetServiceBrowser class use multicast DNS to convey information about network services to and from your application. The API of
NSNetService
provides a convenient way to publish the services offered by your application and to resolve the socket address for a service.The types of services you access using
NSNetService
are the same types that you access directly using BSD sockets. HTTP and FTP are two services commonly provided by systems. (For a list of common services and the ports used by those services, see the file /etc/services.) Applications can also define their own custom services to provide specific data to clients.Source: NSNetService class reference
Related tags: