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

# XblPreserveSessionMode

> XblPreserveSessionMode

# XblPreserveSessionMode

定义用于指示匹配票证是用于新游戏会话还是现有会话的值。

## 语法

```cpp theme={null}
enum class XblPreserveSessionMode  : uint32_t  
{  
    Unknown,  
    Always,  
    Never  
}  
```

## 常量

| 常量      | 说明                                   |
| ------- | ------------------------------------ |
| Unknown | 服务器返回了无法识别的响应。                       |
| Always  | 始终使用现有游戏会话。这适用于为已创建或正在进行的游戏会话匹配更多玩家。 |
| Never   | 从不使用现有游戏会话。这适用于为新游戏会话匹配玩家。           |

## 要求

**头文件：** matchmaking\_c.h

## 另请参阅

[matchmaking\_c](/reference/live/xsapi-c/matchmaking_c/matchmaking_c_members)


## Related topics

- [XblMatchTicketDetailsResponse](/zh-CN/reference/live/xsapi-c/matchmaking_c/structs/xblmatchticketdetailsresponse.md)
- [XblMatchmakingCreateMatchTicketAsync](/zh-CN/reference/live/xsapi-c/matchmaking_c/functions/xblmatchmakingcreatematchticketasync.md)
- [使用 SmartMatch 匹配](/zh-CN/services/xbox-services/multiplayer/matchmaking/concepts/live-matchmaking-how-tos.md)
- [XblMultiplayerSessionWriteMode](/zh-CN/reference/live/xsapi-c/multiplayer_c/enums/xblmultiplayersessionwritemode.md)
- [XblMultiplayerSessionSetMatchmakingServerConnectionPath](/zh-CN/reference/live/xsapi-c/multiplayer_c/functions/xblmultiplayersessionsetmatchmakingserverconnectionpath.md)
