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

# Microsoft Game Development Kit 網路簡介

> GDK 網路 API 概觀，涵蓋 HTTP、WebSocket、通訊端、聊天和遊戲資料，以及網路初始化和暫停與繼續的需求。

本文提供 Microsoft Game Development Kit (GDK) 中網路堆疊的簡介。Microsoft Game Development Kit (GDK) 遊戲的網路堆疊和可用 API 與 Win32 網路 API 類似，可簡化從現有 Win32 遊戲的移植作業，並實現更統一的網路實作。

## 可用的 API

下表摘要說明 Microsoft Game Development Kit (GDK) 的 API 範圍。如需 Microsoft Game Development Kit (GDK) 各 API 的詳細資訊，請參閱其相關連結。

| 功能 | Microsoft Game Development Kit (GDK) |
| - | :-: |
| 整合式解決方案 (網路遊戲資料和遊戲內聊天) | [PlayFab Party](/zh-TW/build/console-features/networking/game-mesh/playfab-party-intro-networking) |
| 安全的用戶端/伺服器網路遊戲資料傳輸 | [MsQuic](/zh-TW/build/console-features/networking/game-mesh/msquic-intro-networking) |
| REST | [XSAPI](https://developer.microsoft.com/games/xbox/docs/gdk/atoc-xsapi-c) |
| HTTP\*\* | [xCurl](/zh-TW/build/console-features/networking/web-requests/intro-xcurl) 或 [WinHTTP](/zh-TW/build/console-features/networking/web-requests/intro-winhttp) |
| WebSocket\*\* | [libHttpClient](/zh-TW/build/console-features/networking/web-requests/http-networking#libhttpclient) (建議) 或 [WinHTTP](/zh-TW/build/console-features/networking/web-requests/intro-winhttp) |
| 通訊端 | [Winsock](/zh-TW/build/console-features/networking/game-mesh/winsock-intro-networking) |
| 通訊端安全性 | OpenSSL 資料包傳輸層安全性 (DTLS) 或 Bcrypt DTLS [(安全遊戲通訊) (NDA 文章)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/game-principles/security/communication-security/communication-security-impl/gc-secure-communication-impl) |
| 網路連線能力 | [XNetworkingGetConnectivityHint](/zh-TW/build/console-features/networking/initialization-connectivity-networking) |
| 連接埠行為 | [與 Win32 Windows PC 相同](/zh-TW/build/console-features/networking/game-mesh/winsock-intro-networking) |
| 遊戲內聊天 | [PlayFab Party](/zh-TW/build/console-features/networking/game-mesh/playfab-party-intro-networking) 或 [Game Chat 2](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro) |

\*\*：若要了解如何選取要使用的 API，請參閱 [Web 要求](/zh-TW/build/console-features/networking/web-requests/http-networking)。

## 新的重要概念

有兩個新概念幾乎適用於每一個 Microsoft Game Development Kit (GDK) 網路 API。

### 網路初始化

所有網路 API 只有在網路初始化之後才能正常運作。您的遊戲應等待網路初始化，然後再呼叫任何網路 API 或依賴網路 API 的中介軟體。如需網路初始化的詳細資訊，請參閱[網路初始化和連線能力](/zh-TW/build/console-features/networking/initialization-connectivity-networking)。

### 暫停與繼續

幾乎所有從網路 API 建立的網路控制代碼和物件，都需要在遊戲收到暫停通知期間清除。每個 API 概觀都會說明如何針對該特定領域執行此作業；您的遊戲及任何使用這些 API 的中介軟體都應遵循此指引。如需一般暫停與繼續的詳細資訊，請參閱 [XBOX 遊戲生命週期 (NDA 文章)](/zh-TW/build/console-features/console-workflows/xbox-game-life-cycle#responding-to-suspend-and-resume) 概觀。

暫停與繼續處理文件：

* [PlayFab Party](/zh-TW/build/console-features/networking/game-mesh/playfab-party-intro-networking#SuspendResume)
* [MsQuic](/zh-TW/build/console-features/networking/game-mesh/msquic-intro-networking#SuspendResume)
* [XCurl](/zh-TW/build/console-features/networking/web-requests/intro-xcurl#title-suspendresume)
* [libHttpClient (HTTP 和 WebSocket)](/zh-TW/build/console-features/networking/web-requests/http-networking#suspend-and-resume-with-libhttpclient)
* [WinHTTP](/zh-TW/build/console-features/networking/web-requests/intro-winhttp)
* [WinSock](/zh-TW/build/console-features/networking/game-mesh/winsock-intro-networking#SuspendResume)
* [慣用本機 UDP 多人遊戲連接埠](/zh-TW/build/console-features/networking/game-mesh/preferred-local-udp-multiplayer-port-networking#SuspendResume)
* [網路初始化](/zh-TW/build/console-features/networking/initialization-connectivity-networking#suspend-and-resume)
* [Game Chat 2](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro#SuspendResume)

## XBOX One Software Development Kit 移轉

如需從先前 XBOX One Software Development Kit 文件移轉之遊戲的詳細資料，請參閱 [XBOX One Software Development Kit 移轉概觀 (NDA 文章)](/zh-TW/build/console-features/networking/xdk-migration/xdk-migration-overview-networking)。本文包含讓 XBOX One Software Development Kit 與 GDK 遊戲版本之間能夠通訊的遊戲指引。

## 另請參閱

[網路初始化和連線能力](/zh-TW/build/console-features/networking/initialization-connectivity-networking)

[Web 要求：HTTP 和 WebSocket](/zh-TW/build/console-features/networking/web-requests/http-networking)

[Windows Sockets](/zh-TW/build/console-features/networking/game-mesh/winsock-intro-networking)

[Game Chat 2](/zh-TW/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro)

[PlayFab Party](/zh-TW/build/console-features/networking/game-mesh/playfab-party-intro-networking)

[適用於 Unreal 的 PlayFab Party Online Subsystem](/zh-TW/build/console-features/networking/game-mesh/party-unreal-online-subsystem)

[適用於 Unity 的 PlayFab Party SDK](/zh-TW/build/console-features/networking/game-mesh/party-unity-plugin)

[MsQuic](/zh-TW/build/console-features/networking/game-mesh/msquic-intro-networking)

[開始使用 XBOX Live API](/zh-TW/services/xbox-services/fundamentals/xbox-services-api/live-gs-xbl-apis)

[慣用 UDP 多人遊戲連接埠](/zh-TW/build/console-features/networking/game-mesh/preferred-local-udp-multiplayer-port-networking)

[Microsoft Game Development Kit 遊戲的安全遊戲通訊 (NDA 文章)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/game-principles/security/communication-security/communication-security-impl/gc-secure-communication-impl)


## Related topics

- [Networking tools in the Microsoft Game Development Kit](/build/console-features/networking/tools/tools-networking-toc.md)
- [Microsoft Game Development Kit User Models](/build/core-features/common/user/gamecore-user-models.md)
- [Introduction to Microsoft Game Development Kit networking](/build/console-features/networking/introduction-networking.md)
- [Microsoft Game Development Kit 사용자 모델](/ko/build/core-features/common/user/gamecore-user-models.md)
- [Modelos de usuario del Microsoft Game Development Kit](/es/build/core-features/common/user/gamecore-user-models.md)
