Monday, May 21, 2007

Network Monitoring

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

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

The Connection abstract base class represents a physical network adapter in the local computer. The application block includes concrete implementations for the following connection types:
  1. 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.
    1. WiredConnection. This represents a wired connection.
    2. WirelessConnection. This represents a wireless connection
  2. DesktopConnection. This represents a local connection. You can use a desktop connection to programmatically updannte its status (connected or discoected).


No comments: