|C#||Visual Basic||Visual C++|
The base class used by the NetServiceBrowser and NetService classes. This class primarily abstracts the asynchronous functionality of its derived classes.
The error type used by the underlying dnssd.dll. These errors can be wrapped in DNSServiceException exceptions.
The NetService class represents a network service that your application publishes or uses as a client. This class, along with the browser class NetServiceBrowser use multicast DNS to communicate accross the local network.
Your application can use this class to either publish information about a service, or as a client to retrieve information about another service.
If you intend to publish a service, you must setup the service to publish and acquire a port on which the socket will recieve connections. You can then create a NetService instance to represent your service and publish it.
If you intend to resolve a service, you can either use NetServiceBrowser to discover services of a given type, or you can create a new NetService object to resolve information about an known existing service. See NetServiceNetServiceNew(String, String, String) for information about creating new net services.
The NetServiceBrowser class enables the user of the class to find published services on a network using multicast DNS. The user uses and instance of the NetServiceBrowser, called a network service browser, to find such Printers, HTTP and FTP servers.
A network service browser can be used to obtain a list of possible domains or services. A NetService is then obtained for each discovered service. You can perform multiple searches at a time by using multiple network service browsers.