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

# XGameStreamingConnectionState

> XGameStreamingConnectionState

# XGameStreamingConnectionState

包含串流用戶端裝置的連線狀態。

<a id="syntaxSection" />

## 語法

```cpp theme={null}
enum class XGameStreamingConnectionState  : uint32_t
{
    Disconnected = 0,
    Connected = 1
}
```

<a id="constantsSection" />

## 常數

| 常數 | 描述 |
| - | - |
| Disconnected | 用戶端裝置目前已中斷連線。 |
| Connected | 用戶端裝置目前已連線。 |

<a id="remarksSection" />

## 備註

裝置可以處於 `Connected` 或 `Disconnected` 狀態。

每當串流裝置連線或中斷連線時，就會叫用 [XGameStreamingClientChangedCallback](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback)。

透過 [XGameStreamingRegisterConnectionStateChanged](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged) 註冊時，會針對任何已連線的裝置叫用回呼。

<a id="requirementsSection" />

## 需求

**標頭：** xgamestreaming.h

**支援的平台：** Windows、XBOX One 系列主機和 XBOX Series 主機

<a id="seealsoSection" />

## 另請參閱

[XGameStreaming](/zh-TW/reference/system/xgamestreaming/xgamestreaming_members)\
[XGameStreamingClientChangedCallback](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback)\
[XGameStreamingUnregisterConnectionStateChanged](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingunregisterconnectionstatechanged)\
[XGameStreamingRegisterConnectionStateChanged](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged)


## Related topics

- [XGameStreamingConnectionStateChangedCallback](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback.md)
- [XGameStreamingIsStreaming](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingisstreaming.md)
- [XGameStreamingGetConnectionState](/zh-TW/reference/system/xgamestreaming/functions/xgamestreaminggetconnectionstate.md)
- [XGameStreamingRegisterConnectionStateChanged](/zh-TW/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged.md)
- [XGameStreaming](/zh-TW/reference/system/xgamestreaming/xgamestreaming_members.md)
