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

Consulta informações de todo o dispositivo sobre o nível atual de conectividade de rede, limites de dados, tipo de interface e estado de inicialização da rede.

## Sintaxe

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

### Parâmetros

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

O estado atual da rede em todo o dispositivo.

### Valor retornado

Tipo: HRESULT

Código de sucesso ou de erro HRESULT.

## Comentários

Essa função retorna informações de todo o dispositivo sobre o nível de conectividade de rede, limites de dados, conectividade com fio versus sem fio e se a rede está inicializada. Você pode escutar alterações com as funções [XNetworkingRegisterConnectivityHintChanged](/pt-BR/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged) e [XNetworkingUnregisterConnectivityHintChanged](/pt-BR/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged).

Os campos na estrutura `XNetworkingConnectivityHint` retornada (exceto o campo `XNetworkingConnectivityHint::networkInitialized`) são dicas. Eles são estimativas de melhor esforço feitas pelo dispositivo sobre o estado atual da rede, com base em um resumo do tráfego de rede no dispositivo. É importante ressaltar que esses campos não representam se há conectividade com os pontos de extremidade específicos do seu título. Recomendamos que, após aguardar a inicialização da rede, você use WinSock e/ou WinHTTP para tentar estabelecer uma conexão com o ponto de extremidade, independentemente do estado do campo `XNetworkingConnectivityHint::connectivityLevelHint`. Se essas APIs falharem posteriormente, recomendamos que você use a API `XNetworkingGetConnectivityHint` para fins adicionais de interface do usuário e relatórios de diagnóstico. Em seguida, aguarde uma alteração no nível de conectividade de rede antes de tentar novamente.

Para obter mais informações sobre a inicialização da rede, confira [Inicialização e conectividade de rede](/pt-BR/build/console-features/networking/initialization-connectivity-networking).

Esse método consulta o estado local no processo de chamada e retorna rapidamente, portanto, é seguro chamá-lo a partir de contextos sensíveis ao tempo.

## Requisitos

**Cabeçalho:** XNetworking.h

**Biblioteca:** xgameruntime.lib

**Plataformas com suporte:** Windows, consoles da família XBOX One e consoles XBOX Series

## Confira também

[XNetworkingRegisterConnectivityHintChanged](/pt-BR/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged)<br />[XNetworkingUnregisterConnectivityHintChanged](/pt-BR/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged)<br />[Detectando o status de inicialização da rede](/pt-BR/build/console-features/networking/initialization-connectivity-networking)<br />[XNetworking](/pt-BR/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingGetConnectivityHint](/reference/networking/xnetworking/functions/xnetworkinggetconnectivityhint.md)
- [XNetworkingConnectivityHint](/reference/networking/xnetworking/structs/xnetworkingconnectivityhint.md)
- [XNetworkingUnregisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged.md)
- [XNetworkingRegisterConnectivityHintChanged](/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged.md)
- [XNetworkingConnectivityHintChangedCallback](/reference/networking/xnetworking/functions/xnetworkingconnectivityhintchangedcallback.md)
