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.
|NetServiceNetServiceNew(String, String, String)|
Initializes a new instance of the NetService class for resolving.
|NetServiceNetServiceNew(String, String, String, Int32)|
Initializes a new instance of the NetService class for publishing.
Gets an IList object representing the available addresses of the resolved service.
The objects in the list are IPEndPoints
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.)
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.)
Returns a byte object representing a TXT record from a given dictionary.
Returns an IDictionary representing a TXT record.
Occurs when a service was resolved.
Occurs when the TXT record for a given service was updated.
Gets the domain of the service.
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.(Inherited from Object.)
Serves as a hash function for a particular type.(Inherited from Object.)
Gets the Type of the current instance.(Inherited from Object.)
Gets the host name of the computer providing the service.
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.)
Creates a shallow copy of the current Object.(Inherited from Object.)
Gets the name of the service.
Attempts to advertise the service on the network.
Starts a resolve process with a timeout.
Stops the currently running search or resolution.
Gets or sets the TXT record data.
Gets the type of the service.
Network operations are performed asynchronously and are returned to your application via events fired from within this class. Events are typically fire in your application's main run loop, see DNSService for information about controlling asynchronous events.
It is important to note that this class uses the same asynchronous method to publish records as it does to fire events. So if you are simply publishing a service, you must still ensure that the DNSService parent class is properly placed into a run loop.