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

# XNetworking（API 内容）

> XNetworking

# XNetworking

包含用于以下功能的方法：

* 检索用于本地多人游戏的首选网络端口。
* 从网络安全允许列表 (NSAL) 检索证书指纹列表。

## 函数

| 函数 | 说明 |
| - | - |
| [XNetworkingConnectivityHintChangedCallback](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingconnectivityhintchangedcallback.md) | 在连接提示结构体变更时被调用。 |
| [XNetworkingGetConnectivityHint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkinggetconnectivityhint.md) | 查询有关当前网络连接级别、数据限制、接口类型和网络初始化状态的设备级信息。 |
| [XNetworkingPreferredLocalUdpMultiplayerPortChangedCallback](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingpreferredlocaludpmultiplayerportchangedcallback.md) | 在首选本地多人游戏端口变更时被调用。 |
| [XNetworkingQueryConfigurationSetting](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingqueryconfigurationsetting.md) | 检索指定网络配置设置的数值。 |
| [XNetworkingQueryPreferredLocalUdpMultiplayerPort](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerypreferredlocaludpmultiplayerport.md) | 获取用于多人游戏流量的首选本地 UDP 端口。 |
| [XNetworkingQueryPreferredLocalUdpMultiplayerPortAsync](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerypreferredlocaludpmultiplayerportasync.md) | 异步获取用于多人游戏流量的首选本地 UDP 端口。 |
| [XNetworkingQueryPreferredLocalUdpMultiplayerPortAsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerypreferredlocaludpmultiplayerportasyncresult.md) | 从 QueryPreferredLocalUdpMultiplayerPortAsync 调用中获取结果。 |
| [XNetworkingQuerySecurityInformationForUrlAsync](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasync.md) | 检索与在通用开发人员门户中为启用 XBOX Live 的游戏所配置的 URL 相关联的额外安全信息。 |
| [XNetworkingQuerySecurityInformationForUrlAsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresult.md) | 从 XNetworkingQuerySecurityInformationForUrlAsync 函数中获取结果。 |
| [XNetworkingQuerySecurityInformationForUrlAsyncResultSize](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlasyncresultsize.md) | 从 QueryThumbprintsForUrlAsync 调用中获取结果缓冲区的大小。 |
| [XNetworkingQuerySecurityInformationForUrlUtf16Async](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16async.md) | 检索与在通用开发人员门户中为启用 XBOX Live 的游戏所配置的 URL 相关联的安全信息。 |
| [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResult](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresult.md) | 从 XNetworkingQuerySecurityInformationForUrlUtf16Async 函数中获取缓冲区结果。 |
| [XNetworkingQuerySecurityInformationForUrlUtf16AsyncResultSize](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerysecurityinformationforurlutf16asyncresultsize.md) | 获取 XNetworkingQuerySecurityInformationForUrlUtf16Async 函数的结果缓冲区大小。 |
| [XNetworkingQueryStatistics](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingquerystatistics.md) | 将指定的网络统计信息检索到调用方提供的缓冲区中。 |
| [XNetworkingRegisterConnectivityHintChanged](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingregisterconnectivityhintchanged.md) | 为游戏注册关于当前网络连接级别、数据限制、接口类型和网络初始化状态等设备级信息变更的通知。 |
| [XNetworkingRegisterPreferredLocalUdpMultiplayerPortChanged](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingregisterpreferredlocaludpmultiplayerportchanged.md) | 注册一个在首选本地 UDP 多人游戏端口发生变更时调用的回调函数。 |
| [XNetworkingSetConfigurationSetting](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingsetconfigurationsetting.md) | 将指定的网络配置设置修改为所提供的数值。 |
| [XNetworkingUnregisterConnectivityHintChanged](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingunregisterconnectivityhintchanged.md) | 取消注册通过 XNetworkingRegisterConnectivityHintChanged 注册的回调函数。 |
| [XNetworkingUnregisterPreferredLocalUdpMultiplayerPortChanged](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingunregisterpreferredlocaludpmultiplayerportchanged.md) | 取消注册通过 RegisterPreferredLocalUdpMultiplayerPortChanged 注册的回调函数。 |
| [XNetworkingVerifyServerCertificate](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingverifyservercertificate.md) | 提供额外的证书链验证。 |

## 结构体

| 结构体 | 说明 |
| - | - |
| [XNetworkingConnectivityHint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingconnectivityhint.md) | 定义当前设备级别的网络状态，包括网络连接级别、数据限制、接口类型和网络初始化状态。 |
| [XNetworkingSecurityInformation](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingsecurityinformation.md) | 定义用于为特定 URL 端点配置 HTTP 堆栈的安全信息。 |
| [XNetworkingStatisticsBuffer](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingstatisticsbuffer.md) | 一个联合体，用于声明缓冲区空间，以存放使用 XNetworkingQueryStatistics 查询网络统计信息时可能返回的所有输出结构体类型。 |
| [XNetworkingTcpQueuedReceivedBufferUsageStatistics](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingtcpqueuedreceivedbufferusagestatistics.md) | 当使用 XNetworkingQueryStatistics 查询网络统计信息，并指定 TitleTcpQueuedReceivedBufferUsage、SystemTcpQueuedReceivedBufferUsage 或 ToolsTcpQueuedReceivedBufferUsage XNetworkingStatisticsType 值时所返回的输出结构体。 |
| [XNetworkingThumbprint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingthumbprint.md) | 定义证书类型、指纹和指纹大小。 |

## 枚举

| 枚举 | 说明 |
| - | - |
| [XNetworkingConfigurationSetting](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/enums/xnetworkingconfigurationsetting.md) | 与 XNetworkingSetConfigurationSetting 或 XNetworkingQueryConfigurationSetting 一起使用的设置类型。 |
| [XNetworkingConnectivityCostHint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/enums/xnetworkingconnectivitycosthint.md) | 定义设备的数据限制分类提示。 |
| [XNetworkingConnectivityLevelHint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/enums/xnetworkingconnectivitylevelhint.md) | 定义设备的连接级别提示。 |
| [XNetworkingStatisticsType](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/enums/xnetworkingstatisticstype.md) | 与 XNetworkingQueryStatistics 一起使用的统计信息类型。 |
| [XNetworkingThumbprintType](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/enums/xnetworkingthumbprinttype.md) | 定义游戏中使用的证书指纹类型。 |


## Related topics

- [Networking API reference](https://docs.xbox.com/zh-CN/reference/networking/gc-reference-networking-toc.md)
- [XNetworkingVerifyServerCertificate](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/functions/xnetworkingverifyservercertificate.md)
- [WinHTTP 概述](https://docs.xbox.com/zh-CN/build/console-features/networking/web-requests/intro-winhttp.md)
- [首选 UDP 多人游戏端口](https://docs.xbox.com/zh-CN/build/console-features/networking/game-mesh/preferred-local-udp-multiplayer-port-networking.md)
- [XNetworkingThumbprint](https://docs.xbox.com/zh-CN/reference/networking/xnetworking/structs/xnetworkingthumbprint.md)
