Windows.Networking.Connectivity Namespace
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Retrieves connection profiles that provide connectivity, usage, and data plan information for established network connections. This data can be used by a connected application to take appropriate action when operating in challenging network scenarios or abiding by data plan limits set by a network provider.
Classes
| AttributedNetworkUsage |
Represents per-attribution usage statistics (bytes sent, bytes received, connected duration) returned by ConnectionProfile.GetAttributedNetworkUsageAsync. |
| CellularApnContext |
Defines properties used to specify an Access Point Name (APN) for a cellular data connection request. |
| ConnectionCost |
Exposes cost and data plan constraint information for a network connection so apps can adapt data usage behavior. |
| ConnectionProfile |
Represents a network connection, including the currently connected network or prior connections. |
| ConnectionProfileFilter |
Defines properties used to filter results from FindConnectionProfilesAsync. At least one property must be set; otherwise the filter is ignored. |
| ConnectionSession |
The ConnectionSession class is used to represent a connection to an access point established with AcquireConnectionAsync. |
| ConnectivityInterval |
Represents a contiguous connectivity span (start timestamp plus duration) for a connection profile. |
| ConnectivityManager |
Provides APIs to (1) acquire cellular connections (custom APN contexts) and (2) add or remove per-app HTTP route policies that direct HTTP traffic through specific connection profiles. |
| DataPlanStatus |
Represents current data plan status (limits, usage, cycle metadata) for a connection profile. |
| DataPlanUsage |
Represents data plan specific data usage information for a connection. |
| DataUsage |
Note DataUsage may be altered or unavailable for releases after Windows 8.1. Instead, use NetworkUsage Represents data usage information returned by the ConnectionProfile.GetLocalUsage method. |
| IPInformation |
Represents the association between an IP address and an adapter on the network. |
| LanIdentifier |
Represents physical identification data for a specific NetworkAdapter object. Retrieve
|
| LanIdentifierData |
Represents the port specific data that enables LAN locality capabilities. |
| NetworkAdapter |
Represents a network adapter and provides access to information about its capabilities, connection status, and network properties. |
| NetworkInformation |
Provides access to network connection information for the local machine. |
| NetworkItem |
Represents a connected network. |
| NetworkSecuritySettings |
Exposes the authentication and encryption types applied to a connection (primarily meaningful for Wi-Fi and other wireless links). |
| NetworkStateChangeEventDetails |
Indicates which network-related properties changed for the current status change event so handlers can perform targeted (not full) refresh logic. |
| NetworkUsage |
Represents per-interval network usage statistics returned by ConnectionProfile.GetNetworkUsageAsync. |
| ProviderNetworkUsage |
Represents per-provider aggregated usage (bytes sent / bytes received) returned by ConnectionProfile.GetProviderNetworkUsageAsync. |
| ProxyConfiguration |
Represents resolved proxy settings (proxy endpoints and direct-connect flag) for a specific target URI. |
| RoutePolicy |
The RoutePolicy class is used to represent the traffic routing policy for a special PDP Context/APN. |
| WlanConnectionProfileDetails |
Used to access information specific to a WLAN connection. |
| WwanConnectionProfileDetails |
Provides WWAN (cellular) specific details for a connection profile: carrier identifiers, registration state, current data class, IP kind, and purpose GUIDs. |
Structs
| NetworkUsageStates |
Defines the desired state of the connection profile for which usage data is returned by the method GetNetworkUsageAsync. |
Enums
| CellularApnAuthenticationType |
Defines values that indicate the authentication type used for a APN. These values are referenced when providing APN details using a CellularApnContext object. |
| ConnectionProfileDeleteStatus |
Defines values that indicate the result of an attempt to delete a connection profile. |
| DataUsageGranularity |
Defines levels of granularity used when retrieving data usage statistics with GetNetworkUsageAsync. |
| DomainAuthenticationKind |
Specifies the enterprise ___domain authentication mechanism (if any) associated with a network connection profile. Only one non- |
| DomainConnectivityLevel |
Defines the ___domain authentication status for a network connection. |
| NetworkAuthenticationType |
Defines values that indicate the type of authentication used by the network. |
| NetworkConnectivityLevel |
Defines the level of connectivity currently available. |
| NetworkCostType |
Defines values for cost policies on a network connection. |
| NetworkEncryptionType |
Defines values that indicate the type of encryption used for authentication. |
| NetworkTypes |
Defines the network connection types. |
| RoamingStates |
Defines the roaming states. |
| TriStates |
Used with the NetworkUsageStates structure to define the desired roaming state and shared state of a network connection. |
| WwanDataClass |
Defines values used to indicate the class of data service provided by a WWAN network connection. |
| WwanNetworkIPKind |
Defines constants that describe a level of supported IP. The values reflect the WWAN_IP_TYPE enumeration. You can use these values to determine which cellular profile to use (for example, to choose between IMS and SUPL). |
| WwanNetworkRegistrationState |
Defines the network registration states for a WWAN connection. |
Delegates
| NetworkStatusChangedEventHandler |
Represents the method that handles network status change notifications. This method is called when any properties exposed by the NetworkInformation object changes while the app is active. |
Remarks
Use this namespace to assess connectivity across WLAN, WWAN, and Ethernet interfaces, read cost and data plan metadata, and react to network state changes. Key entry points include:
- NetworkInformation for discovering active and historical connection profiles and subscribing to status changes.
- ConnectionProfile for inspecting cost, adapter, and plan details on a specific interface.
- ConnectionCost and DataPlanStatus for making cost-aware decisions before transferring data.