> ## 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](/reference/system/xgamestreaming/functions/xgamestreamingconnectionstatechangedcallback)。

通过 [XGameStreamingRegisterConnectionStateChanged](/reference/system/xgamestreaming/functions/xgamestreamingregisterconnectionstatechanged) 注册后，会为任何已连接的设备调用回调。

<a id="requirementsSection" />

## 要求

**标头：** xgamestreaming.h

**支持的平台：** Windows、XBOX One 系列主机和 XBOX Series 主机

<a id="seealsoSection" />

## 另请参阅

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


## Related topics

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