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

# XGameStreamingConnectionStateChangedCallback

> XGameStreamingConnectionStateChangedCallback

# XGameStreamingConnectionStateChangedCallback

接続されているストリーミング クライアントの状態が変化するたびに呼び出されるコールバック関数。

<a id="syntaxSection" />

## Syntax

```cpp theme={null}
void XGameStreamingConnectionStateChangedCallback(
         void* context,
         XGameStreamingClientId client,
         XGameStreamingConnectionState state
)
```

<a id="parametersSection" />

### Parameters

*context*   \_In\_opt\_\
型: void\*

イベントの購読時に指定されたコンテキスト。

*client*   \_In\_\
型: XGameStreamingClientId

イベントが参照するクライアント ストリーミング デバイス。

*state*   \_In\_\
型: [XGameStreamingConnectionState](/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate)

クライアントの新しい接続状態。

<a id="retvalSection" />

### Return value

型: void

<a id="remarksSection" />

## Remarks

`XGameStreamingClientChangedCallback` は、ストリーミング デバイスが接続または切断されるたびに呼び出されます。

登録時に、接続されている各デバイスに対してもこのコールバックが呼び出されます。

[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged) を通じて登録すると、既に接続されているデバイスに対してもコールバックが呼び出されます。

<a id="requirementsSection" />

## Requirements

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

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

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

<a id="seealsoSection" />

## See also

[XGameStreamingConnectionState](/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate)\
[XGameStreamingUnregisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged)\
[XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)\
[XGameStreaming](/reference/system/xgamestreaming/xgamestreaming_members)


## Related topics

- [XGameStreamingUnregisterConnectionStateChanged](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged.md)
- [XGameStreamingRegisterConnectionStateChanged](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreaming](/ja-jp/reference/system/xgamestreaming/xgamestreaming_members.md)
- [XGameStreamingUnregisterClientPropertiesChanged](/ja-jp/reference/system/xgamestreaming/functions/xgamestreamingunregisterclientpropertieschanged.md)
- [XGameStreamingConnectionState](/ja-jp/reference/system/xgamestreaming/enums/xgamestreamingconnectionstate.md)
