> ## 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.

# XNetworkingGetConnectivityHint

> XNetworkingGetConnectivityHint

# XNetworkingGetConnectivityHint

Queries for device-wide information about the current network connectivity level, data limits, interface type, and network initialization state.

## Syntax

```cpp theme={null}
HRESULT XNetworkingGetConnectivityHint(
         XNetworkingConnectivityHint* connectivityHint
)
```

### Parameters

*connectivityHint*   \_Out\_<br />Type: [XNetworkingConnectivityHint](/reference/networking/xnetworking/structs/xnetworkingconnectivityhint)\*

The current device-wide state of the network.

### Return value

Type: HRESULT

HRESULT success or error code.

## Remarks

This function returns device-wide information about the network connectivity level, data limits, wired vs. wireless connectivity, and whether the network is initialized. You can listen for changes with the [XNetworkingRegisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged) and [XNetworkingUnregisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged) functions.

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.

For more information about network initialization, see [Network Initialization & Connectivity](/build/console-features/networking/initialization-connectivity-networking).

This method interrogates the local state within the calling process and returns quickly, so it is safe to call from time-sensitive contexts.

## Requirements

**Header:** XNetworking.h

**Library:** xgameruntime.lib

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

## See also

[XNetworkingRegisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged)<br />[XNetworkingUnregisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged)<br />[Detecting Network Initialization Status](/build/console-features/networking/initialization-connectivity-networking)<br />[XNetworking](/reference/networking/xnetworking/xnetworking_members)
