> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# XNetworkingConnectivityHint

> XNetworkingConnectivityHint

# XNetworkingConnectivityHint

Defines the current device-wide state of the network, including network connectivity level, data limits, interface type, and network initialization state.

## Syntax

```cpp theme={null}
typedef struct XNetworkingConnectivityHint {
    XNetworkingConnectivityLevelHint connectivityLevel;
    XNetworkingConnectivityCostHint connectivityCost;
    uint32_t ianaInterfaceType;
    bool networkInitialized;
    bool approachingDataLimit;
    bool overDataLimit;
    bool roaming;
} XNetworkingConnectivityHint
```

### Members

*connectivityLevel*<br />Type: [XNetworkingConnectivityLevelHint](/reference/networking/xnetworking/enums/xnetworkingconnectivitylevelhint)

The current best-effort connectivity level for the device.

*connectivityCost*<br />Type: [XNetworkingConnectivityCostHint](/reference/networking/xnetworking/enums/xnetworkingconnectivitycosthint)

The current best-effort classification of the data limits for the device.

*ianaInterfaceType*<br />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](https://learn.microsoft.com/windows-hardware/drivers/network/ndis-interface-types).

*networkInitialized*<br />Type: bool

Determines whether the network is currently initialized.  For more information, see the [Network Initialization](/build/console-features/networking/initialization-connectivity-networking) section of [Retrieving network information](/build/console-features/networking/initialization-connectivity-networking).

*approachingDataLimit*<br />Type: bool

Determines whether the device is close to exceeding its data limits.

*overDataLimit*<br />Type: bool

Determines whether the device has exceeded its data limits.

*roaming*<br />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.

<Note>
  Attempting to use XNetworking APIs with a network that is not initialized will result in failed calls and unpredictable behavior.
</Note>

This structure is returned from the [XNetworkingGetConnectivityHint](/reference/networking/xnetworking/functions/xnetworkinggetconnectivityhint) API and callback from the register flow. For network information in Microsoft Game Development Kit (GDK) titles, see [Retrieving Network Information](/build/console-features/networking/initialization-connectivity-networking).

The fields in the returned `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.

## Requirements

**Header:** XNetworking.h

**Supported platforms:** Windows, XBOX One family consoles and XBOX Series consoles

## See also

[XNetworking](/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingConnectivityHintChangedCallback](/reference/networking/xnetworking/functions/xnetworkingconnectivityhintchangedcallback.md)
- [XNetworkingGetConnectivityHint](/reference/networking/xnetworking/functions/xnetworkinggetconnectivityhint.md)
- [XNetworkingConnectivityLevelHint](/reference/networking/xnetworking/enums/xnetworkingconnectivitylevelhint.md)
- [XNetworkingRegisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged.md)
- [XNetworkingConnectivityCostHint](/reference/networking/xnetworking/enums/xnetworkingconnectivitycosthint.md)
