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

# GDK 遊戲的安全遊戲通訊

> GDK 遊戲中依流量類型建議的安全通訊方法摘要。

GDK 遊戲中依流量類型建議的安全通訊方法：

| 通訊類型 | 最佳做法 | API |
| - | - | - |
| Web 要求 | 使用 HTTPS，並透過 XSTS 權杖進行使用者驗證 | [xCurl](/zh-TW/build/console-features/networking/web-requests/intro-xcurl) |
| WebSocket (TCP) | 使用安全 WebSocket (TLS)，並透過 XSTS 權杖進行使用者驗證 | [libHttpClient](/zh-TW/build/console-features/networking/web-requests/http-networking) |
| 對等 (UDP) | 使用安全的平台 API 進行加密和驗證 | [PlayFab Party](/zh-TW/build/console-features/networking/game-mesh/playfab-party-intro-networking) |
| 用戶端/伺服器 (UDP) | QUIC 安全資料傳輸通訊協定 | [MsQuic](/zh-TW/build/console-features/networking/game-mesh/msquic-intro-networking) |

如需 XSTS 驗證權杖剖析，請參閱 [XBOX services 安全性權杖](/zh-TW/services/xbox-services/fundamentals/s2s-auth-calls/service-authentication/security-tokens/live-security-tokens)指引。

## 相關 API 文件

* [XUser 參考](/zh-TW/reference/system/xuser/xuser_members)：`XUserGetTokenAndSignatureAsync`、XSTS 權杖取得
* [XCurl API 參考](/zh-TW/reference/networking/xcurl/functions/xcurl_global_init_mem)：已驗證要求的 TLS 選項
* [libHttpClient 參考](/zh-TW/reference/live/httpclient/httpclient/httpclient_members)：XSAPI 使用的 HTTPS/WebSocket 傳輸
* [XSAPI REST 參考](/zh-TW/reference/live/rest/atoc-xboxlivews-reference)：對 XBOX services 進行經 XSTS 驗證的呼叫
* [XNetworking API 參考](/zh-TW/reference/networking/xnetworking/xnetworking_members)：憑證驗證與提示介面

## 另請參閱

* [安全的 Web 要求與 WebSocket](/zh-TW/build/game-principles/security/secure-webrequest-impl)
* [安全的遊戲網狀架構](/zh-TW/build/game-principles/security/secure-game-mesh-impl)
* [安全通訊範例](/zh-TW/build/game-principles/security/secure-samples)
* [S2S 驗證 (XBOX services)](/zh-TW/services/xbox-services/fundamentals/s2s-auth-calls/service-authentication/live-title-service-authentication)


## Related topics

- [NDA 主題目錄 - Microsoft Learn 線上連結](/zh-TW/nda/nda-topic-directory.md)
- [XBOX 主機遊戲的認證測試 XBOX 需求](/zh-TW/publishing/certification/console-cert-tested-requirements.md)
- [XBOX 遊戲的 XBOX 需求](/zh-TW/publishing/certification/xbox-requirements.md)
- [XR-015 管理玩家通訊](/zh-TW/publishing/certification/xr/xr-015.md)
- [認證逐步指南](/zh-TW/publishing/game-publishing/concepts/certification/certification-guide.md)
