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

# XGameStreamingGetConnectionState

> XGameStreamingGetConnectionState

# XGameStreamingGetConnectionState

指定されたデバイスの現在の接続状態を取得します。

## Syntax

```cpp theme={null}
XGameStreamingConnectionState XGameStreamingGetConnectionState(  
         XGameStreamingClientId client  
)  
```

### Parameters

*client*   \_In\_\
型: XGameStreamingClientId

接続状態を要求するクライアント。

### Return value

型: [XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)

## Remarks

この API は、指定されたクライアントの [XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md) を返します。これにより、ゲームが前回確認して以降にデバイスが切断されたかどうかを確認できます。

いずれかのデバイスが接続されストリーミング中であるかどうかだけを確認したい場合は、[XGameStreamingIsStreaming](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md) の使用を検討してください。

ストリーミング クライアントの接続や切断時に通知を受け取る必要がある場合は、[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md) の使用を検討してください。

## Requirements

**ヘッダー:** xgamestreaming.h

**ライブラリ:** xgameruntime.lib

**サポートされているプラットフォーム:** Windows、XBOX One ファミリー本体および XBOX Series 本体

## See also

[XGameStreamingIsStreaming](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md)\
[XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)\
[XGameStreamingGetClientCount](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreaminggetclientcount.md)\
[XGameStreamingGetClients](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreaminggetclients.md)\
[XGameStreaming](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)


## Related topics

- [XGameStreaming (API の内容)](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)
- [Unity プロジェクトでの GDK API 用 C# ラッパーの使用](https://docs.xbox.com/ja-jp/build/gdk-and-engines/unity/unity-api-wrappers.md)
- [XGameStreamingConnectionState](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)
- [XGameStreamingConnectionStateChangedCallback](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback.md)
- [XGameStreamingRegisterConnectionStateChanged](https://docs.xbox.com/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
