The ConnectionMonitor class exposes a NetworkCollection instance through its Networks property. The NetworkCollection class inherits from KeyedCollection, exposing a generic list of Network instances keyed by name. This allows you to enumerate the available networks in your application code.
The Network class represents a logical network and exposes the network name and address. It also exposes a Connected property, which your code can use to check for connectivity to a specific network. You can use the StateChanged event to detect changes to the status of the network connection.
Connection Monitoring
- NicConnection. This represents any network interface connection—for example, an Ethernet card or wireless adapter. This class provides the capability to detect if the application has a connection to a network.
The application block also contains two classes that derive from NicConnection. - WiredConnection. This represents a wired connection.
- WirelessConnection. This represents a wireless connection
- DesktopConnection. This represents a local connection. You can use a desktop connection to programmatically updannte its status (connected or discoected).
No comments:
Post a Comment