XNetworkingConnectivityHint
Defines the current device-wide state of the network, including network connectivity level, data limits, interface type, and network initialization state.Syntax
Members
connectivityLevelType: XNetworkingConnectivityLevelHint The current best-effort connectivity level for the device. connectivityCost
Type: XNetworkingConnectivityCostHint The current best-effort classification of the data limits for the device. ianaInterfaceType
Type: uint32_t The current interface type that is likely to be used by WinSock and WinHTTP to reach the internet. One of the IANA NDIS Interface Types. networkInitialized
Type: bool Determines whether the network is currently initialized. For more information, see the Network Initialization section of Retrieving network information. approachingDataLimit
Type: bool Determines whether the device is close to exceeding its data limits. overDataLimit
Type: bool Determines whether the device has exceeded its data limits. roaming
Type: bool Determines whether the device is roaming or not.
Remarks
Ensure that the networkInitialized member returns true before attempting to use any networking or security APIs.Attempting to use XNetworking APIs with a network that is not initialized will result in failed calls and unpredictable behavior.
XNetworkingConnectivityHint structure (except the XNetworkingConnectivityHint::networkInitialized field) are hints. They are best-effort guesses by the device about the current state of the network based on a summary of the network traffic on the device. Importantly, these fields do not represent whether there is connectivity to your specific title endpoints. We recommend that, after waiting for network initialization, you use WinSock and/or WinHTTP to try to establish a connection to your endpoint regardless of the state of the XNetworkingConnectivityHint::connectivityLevelHint field. If those APIs subsequently fail, we recommend that you then use the XNetworkingGetConnectivityHint API for additional UI and diagnostic reporting purposes. You should then wait for a change in the network connectivity level before trying again.
