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.
| C# | Visual Basic | Visual C++ |
public sealed class NetServiceBrowser : DNSService
Public NotInheritable Class NetServiceBrowser _ Inherits DNSService
public ref class NetServiceBrowser sealed : public DNSService
| All Members | Constructors | Methods | Properties | Events | |
| Icon | Member | Description |
|---|---|---|
| NetServiceBrowserNetServiceBrowserNew()() |
Initialize a new instance of the NetServiceBrowser class.
| |
| AllowApplicationForms |
Allows the application to attempt to post async replies over the
application "main loop" by using the message queue of the first available
open form (window). This is retrieved through
OpenForms.
(Inherited from DNSService.) | |
| AllowMultithreadedCallbacks |
If this is set to true, AllowApplicationForms
is set to false and InvokeableObject is set
to null, any time an asynchronous method needs to invoke a method in the
main loop, it will instead run the method in its own thread.
(Inherited from DNSService.) | |
| DidFindDomain |
Occurs when a domain has been found.
| |
| DidFindService |
Occurs when a NetService was found.
| |
| DidRemoveDomain |
Occurs when a domain is no longer available.
| |
| DidRemoveService |
Occurs when a NetService is no longer available.
| |
| Equals(Object) | (Inherited from Object.) | |
| Finalize()() | Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.) | |
| GetHashCode()() | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetType()() | Gets the Type of the current instance. (Inherited from Object.) | |
| InvokeableObject |
Set the ISynchronizeInvoke
object to use as the invoke object. When returning results from asynchronous calls,
the Invoke method on this object will be called to pass the results back
in a thread safe manner.
(Inherited from DNSService.) | |
| MemberwiseClone()() | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| SearchForBrowseableDomains()() |
Starts a search for domains visible to the host.
| |
| SearchForRegistrationDomains()() |
Starts a search for domains in which the host may register services.
| |
| SearchForService(String, String) |
Starts a search for services of a given type within a given domain.
| |
| Stop()() |
Stops the currently running search or resolution.
| |
| ToString()() | (Inherited from Object.) |
Network searches are performed asynchronously and are returned to your application via events fired from within this class. Events are typically fired in your application's main run loop, see DNSService for information about controlling asynchronous events.
| Object | ||
| DNSService | ||
| NetServiceBrowser | ||