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

# GDK ネットワーク スタックとネットワーク API の概要

> HTTP、WebSocket、ソケット、チャット、およびゲーム データ向けの GDK ネットワーク API の概要と、ネットワーク初期化およびサスペンド/レジュームに関する要件を解説します。

この記事では、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](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/playfab-party-intro-networking.md) |
| セキュアなクライアント/サーバー ネットワーク ゲーム データ トランスポート | [MsQuic](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/msquic-intro-networking.md) |
| REST | [XSAPI](https://developer.microsoft.com/games/xbox/docs/gdk/atoc-xsapi-c) |
| HTTP\*\* | [xCurl](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-xcurl.md) または [WinHTTP](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-winhttp.md) |
| WebSocket\*\* | [libHttpClient](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/http-networking.md#libhttpclient) (推奨) または [WinHTTP](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-winhttp.md) |
| ソケット | [Winsock](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md) |
| ソケット セキュリティ | OpenSSL Datagram Transport Layer Security (DTLS) または Bcrypt DTLS [(Secure Game Communication) (NDA 記事)](https://learn.microsoft.com/gaming/gdk/docs/gdk-dev/game-principles/security/communication-security/communication-security-impl/gc-secure-communication-impl) |
| ネットワーク接続 | [XNetworkingGetConnectivityHint](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md) |
| ポートの動作 | [Win32 Windows PC と同一](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md) |
| ゲーム内チャット | [PlayFab Party](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/playfab-party-intro-networking.md) または [Game Chat 2](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md) |

\*\*: どの API を使用するかを判断する方法については、[Web リクエスト](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/http-networking.md) を参照してください。

## 新しい重要な概念

Microsoft Game Development Kit (GDK) のネットワーク API のほぼすべてに当てはまる、新しい 2 つの概念があります。

### ネットワーク初期化

すべてのネットワーク API は、ネットワークが初期化された後でなければ正しく動作しません。タイトルは、いずれかのネットワーク API またはそれに依存するミドルウェアを呼び出す前に、ネットワークの初期化を待機する必要があります。ネットワーク初期化の詳細については、[ネットワーク初期化と接続](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md) を参照してください。

### サスペンドとレジューム

ネットワーク API から作成されたほぼすべてのネットワーク ハンドルおよびオブジェクトは、タイトルのサスペンド通知時にクリーンアップする必要があります。この方法は各 API 概要ページで説明しています。タイトル本体だけでなく、これらの API を利用するミドルウェアもこのガイダンスに従う必要があります。サスペンド/レジューム全般については、[XBOX Game Life Cycle (NDA 記事)](https://docs.xbox.com/ja-jp/build/console-features/console-workflows/xbox-game-life-cycle.md#responding-to-suspend-and-resume) の概要を参照してください。

サスペンド/レジューム対応のドキュメント:

* [PlayFab Party](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/playfab-party-intro-networking.md#SuspendResume)
* [MsQuic](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/msquic-intro-networking.md#SuspendResume)
* [XCurl](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-xcurl.md#title-suspendresume)
* [libHttpClient (HTTP および WebSocket)](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/http-networking.md#suspend-and-resume-with-libhttpclient)
* [WinHTTP](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-winhttp.md)
* [WinSock](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md#SuspendResume)
* [Preferred Local UDP Multiplayer Port](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/preferred-local-udp-multiplayer-port-networking.md#SuspendResume)
* [ネットワーク初期化](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md#suspend-and-resume)
* [Game Chat 2](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md#SuspendResume)

## XBOX One Software Development Kit からの移行

以前の XBOX One Software Development Kit ドキュメントから移行するタイトルの詳細については、[XBOX One Software Development Kit 移行概要 (NDA 記事)](https://docs.xbox.com/ja-jp/build/console-features/networking/xdk-migration/xdk-migration-overview-networking.md) を参照してください。この記事には、XBOX One Software Development Kit と GDK タイトル バージョン間の通信を有効にするタイトル向けのガイダンスも含まれます。

## 関連項目

[ネットワーク初期化と接続](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md)

[Web リクエスト: HTTP と WebSocket](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/http-networking.md)

[Windows Sockets](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md)

[Game Chat 2](https://docs.xbox.com/ja-jp/services/xbox-services/multiplayer/chat/game-chat2/game-chat-2-intro.md)

[PlayFab Party](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/playfab-party-intro-networking.md)

[PlayFab Party Online Subsystem for Unreal](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/party-unreal-online-subsystem.md)

[PlayFab Party SDK for Unity](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/party-unity-plugin.md)

[MsQuic](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/msquic-intro-networking.md)

[XBOX Live API の入門](https://docs.xbox.com/ja-jp/services/xbox-services/fundamentals/xbox-services-api/live-gs-xbl-apis.md)

[Preferred UDP multiplayer port](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/preferred-local-udp-multiplayer-port-networking.md)

[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

- [Windows Sockets の概要](https://docs.xbox.com/ja-jp/build/console-features/networking/game-mesh/winsock-intro-networking.md)
- [WinHTTP の概要](https://docs.xbox.com/ja-jp/build/console-features/networking/web-requests/intro-winhttp.md)
- [ネットワーク](https://docs.xbox.com/ja-jp/build/console-features/networking/gc-networking-toc.md)
- [ネットワーク初期化状態の検出](https://docs.xbox.com/ja-jp/build/console-features/networking/initialization-connectivity-networking.md)
- [PlayFab Party ネットワークと検出フローの連携方法](https://docs.xbox.com/ja-jp/services/playfab/multiplayer/networking/concepts-discovery.md)
