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

# XNetworkingConnectivityLevelHint

> XNetworkingConnectivityLevelHint

# XNetworkingConnectivityLevelHint

定义设备的连接级别提示。

## 语法

```cpp theme={null}
enum class XNetworkingConnectivityLevelHint  : uint32_t
{
    Unknown = 0,
    None = 1,
    LocalAccess = 2,
    InternetAccess = 3,
    ConstrainedInternetAccess = 4,
}
```

## 常量

| 常量                        | 说明               |
| ------------------------- | ---------------- |
| Unknown                   | 连接级别未知。          |
| None                      | 无连接。             |
| LocalAccess               | 仅本地网络访问。         |
| InternetAccess            | 本地和 Internet 访问。 |
| ConstrainedInternetAccess | 有限的 Internet 访问。 |

## 备注

此枚举定义设备的当前连接级别提示。

<Note>连接级别提示是设备根据设备上网络流量的摘要对网络当前状态的尽力猜测。</Note>

`Unknown` 连接级别发生在网络未初始化时。

`ConstrainedInternetAccess` 值指示强制门户连接，其中提供了对 Web 门户的本地访问，但访问 Internet 需要通过门户提供特定凭据。此级别的连接通常在使用位于公共场所（例如咖啡店和书店）的托管连接时遇到。但是，该值不保证检测到强制门户。当报告 `LocalAccess` 时，游戏还应通过使用强制门户的 URL 或尝试访问然后重定向到强制门户的公共网站来确定是否可以到达强制门户。

## 要求

**头文件：** XNetworking.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

## 另请参阅

[网络初始化和连接](/build/console-features/networking/initialization-connectivity-networking)\
[XNetworkingConnectivityHint](/reference/networking/xnetworking/structs/xnetworkingconnectivityhint)\
[XNetworking](/reference/networking/xnetworking/xnetworking_members)


## Related topics

- [XNetworkingConnectivityHint](/zh-CN/reference/networking/xnetworking/structs/xnetworkingconnectivityhint.md)
- [检测网络初始化状态](/zh-CN/build/console-features/networking/initialization-connectivity-networking.md)
- [XNetworking](/zh-CN/reference/networking/xnetworking/xnetworking_members.md)
- [XNetworkingGetConnectivityHint](/zh-CN/reference/networking/xnetworking/functions/xnetworkinggetconnectivityhint.md)
- [XNetworkingRegisterConnectivityHintChanged](/zh-CN/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged.md)
