

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 适用于 Amazon GameLift Servers 的服务器 SDK（Unreal）– 操作
<a name="integration-server-sdk-unreal-ref-actions"></a>

使用适用于 Unreal 的服务器 SDK，将要托管的多人游戏与 Amazon GameLift Servers 集成。有关集成过程的指南，请参阅[借助服务器 SDK 将 Amazon GameLift Servers 添加到游戏服务器](gamelift-sdk-server-api.md)。

**注意**  
本参考适用于 Amazon GameLift Servers 服务器 SDK 的早期版本。有关最新版本，请参阅[适用于 Amazon GameLift Servers 的 C\$1\$1（Unreal）服务器 SDK 5.x – 操作](integration-server-sdk5-unreal-actions.md)。

此 API 在 `GameLiftServerSDK.h` 和 `GameLiftServerSDKModels.h` 中定义。

设置 Unreal Engine 插件并查看代码示例[将 Amazon GameLift Servers 集成到 Unreal Engine 项目中](integration-engines-setup-unreal.md)。

# 适用于 Amazon GameLift Servers 的服务器 SDK（Unreal）– 数据类型
<a name="integration-server-sdk-unreal-ref-datatypes"></a>

使用适用于 Unreal 的 Amazon GameLift Servers 服务器 SDK 参考，将要托管的多人游戏与 Amazon GameLift Servers 集成。有关集成过程的指南，请参阅[借助服务器 SDK 将 Amazon GameLift Servers 添加到游戏服务器](gamelift-sdk-server-api.md)。

**注意**  
本参考适用于 Amazon GameLift Servers 服务器 SDK 的早期版本。有关最新版本，请参阅[适用于 Amazon GameLift Servers 的 C\$1\$1（Unreal）服务器 SDK 5.x – 数据类型](integration-server-sdk5-unreal-datatypes.md)。

此 API 在 `GameLiftServerSDK.h` 和 `GameLiftServerSDKModels.h` 中定义。

设置 Unreal Engine 插件并查看代码示例[将 Amazon GameLift Servers 集成到 Unreal Engine 项目中](integration-engines-setup-unreal.md)。

[适用于 Amazon GameLift Servers 的服务器 SDK（Unreal）– 操作](integration-server-sdk-unreal-ref-actions.md)

**Topics**
+ [FDescribePlayerSessionsRequest](#integration-server-sdk-unreal-ref-dataypes-playersessions)
+ [FProcess参数](#integration-server-sdk-unreal-ref-dataypes-process)
+ [FStartMatchBackfillRequest](#integration-server-sdk-unreal-ref-dataypes-startmatchbackfillrequest)
+ [FStopMatchBackfillRequest](#integration-server-sdk-unreal-ref-dataypes-stopmatchbackfillrequest)

## FDescribePlayerSessionsRequest
<a name="integration-server-sdk-unreal-ref-dataypes-playersessions"></a>

此数据类型用于指定检索哪些玩家会话。您可以按如下方式使用它：
+ 提供 a PlayerSessionId 以请求特定的玩家会话。
+ 提供 a GameSessionId 以请求指定游戏会话中的所有玩家会话。
+ 提供 a PlayerId 以请求指定玩家的所有玩家会话。

对于大型玩家会话集合，请使用分页参数以在有序数据块中检索结果。

### 内容
<a name="integration-server-sdk-unreal-ref-dataypes-playersessions-contents"></a>

**GameSessionId**  
游戏会话的唯一标识符。使用此参数可请求指定游戏会话的所有玩家会话。游戏会话 ID 的格式如下所示：`arn:aws:gamelift:<region>::gamesession/fleet-<fleet ID>/<ID string>`。<ID string> 的值为自定义 ID 字符串（如果在创建游戏会话时指定了一个）或者是生成的字符串。  
类型：字符串  
必需：否

**限制**  
要返回的最大结果数量。将此参数与一起*NextToken*使用可将结果作为一组连续页面获取。如果指定玩家会话 ID，将忽略此参数。  
类型：整数  
必需：否

**NextToken**  
令牌指示结果的下一个连续页面的开头。使用之前的调用返回此操作的令牌。要指定结果集的开始，请不要指定值。如果指定玩家会话 ID，将忽略此参数。  
类型：字符串  
必需：否

**PlayerId**  
玩家的唯一标识符。玩家 IDs 由开发者定义。请参阅[生成玩家 ID](player-sessions-player-identifiers.md)。  
类型：字符串  
必需：否

**PlayerSessionId**  
玩家会话的唯一标识符。  
类型：字符串  
必需：否

**PlayerSessionStatusFilter**  
用于筛选结果的玩家会话状态。可能的玩家会话状态包括以下内容：  
+ RESERVED — 已收到玩家会话请求，但玩家尚未连接到服务器进程 and/or 已通过验证。
+ ACTIVE - 服务器进程已验证玩家，当前已连接。
+ COMPLETED - 玩家连接已断开。
+ TIMEDOUT — 已收到玩家会话请求，但未在超时限制（60 秒）内验证未连接 and/or 的玩家。
类型：字符串  
必需：否

## FProcess参数
<a name="integration-server-sdk-unreal-ref-dataypes-process"></a>

此数据类型包含一组在 [ProcessReady()](integration-server-sdk-unreal-ref-actions.md#integration-server-sdk-unreal-ref-processready) 调用中发送到 Amazon GameLift Servers 服务的参数。

### 内容
<a name="integration-server-sdk-unreal-ref-dataypes-process-contents"></a>

**端口**  
服务器进程侦听新玩家连接的端口号。该值必须在部署此游戏服务器构建的任意实例集上所配置的端口范围内。此端口号包含在游戏会话和玩家会话对象中，游戏会话在连接到服务器进程时会使用该端口号。  
类型：整数   
是否必需：是

**logParameters**  
包含游戏会话日志文件目录路径列表的对象。  
键入： TArray< FString >  
必需：否

**onStartGameSession**  
Amazon GameLift Servers服务为激活新游戏会话而调用的回调函数的名称。 Amazon GameLift Servers调用此函数是为了响应客户端的请求[CreateGameSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreateGameSession.html)。回调函数采用一个[GameSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameSession.html)对象（在*Amazon GameLift Servers服务 API 参考*中定义）。  
类型： FOnStartGameSession   
是否必需：是

**onProcessTerminate**  
Amazon GameLift Servers 服务为强制关闭服务器进程而调用的回调函数的名称。调用此函数之后，Amazon GameLift Servers 等待五分钟以便服务器进程关闭，然后使用 [ProcessEnding()](integration-server-sdk-unreal-ref-actions.md#integration-server-sdk-unreal-ref-processending) 调用响应，再关闭服务器进程。  
类型： FSimple代表  
必需：否

**onHealthCheck**  
Amazon GameLift Servers 服务为向服务器进程请求运行状况报告而调用的回调函数的名称。Amazon GameLift Servers 每隔 60 秒调用此函数一次。调用此函数后，Amazon GameLift Servers 将等待 60 秒接收响应，如果未收到响应，则会将服务器进程记录为不正常。  
类型： FOnHealthCheck  
必需：否

**onUpdateGameSession**  
Amazon GameLift Servers 服务为向服务器进程传递更新的游戏会话对象而调用的回调函数的名称。当[对战回填](https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html)请求处理完毕时，Amazon GameLift Servers 会调用此函数以提供更新的对战构建器数据。它将传递一个 [GameSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_GameSession.html) 对象、一个状态更新（`updateReason`）以及对战回填票证 ID。  
类型： FOnUpdateGameSession   
必需：否

## FStartMatchBackfillRequest
<a name="integration-server-sdk-unreal-ref-dataypes-startmatchbackfillrequest"></a>

此数据类型用于发送对战回填请求。此信息在 [StartMatchBackfill()](integration-server-sdk-unreal-ref-actions.md#integration-server-sdk-unreal-ref-startmatchbackfill) 调用中传递给 Amazon GameLift Servers 服务。

### 内容
<a name="integration-server-sdk-unreal-ref-dataypes-startbackfill-contents"></a>

**GameSessionArn**  
 游戏会话的唯一标识符。此 API 操作 [GetGameSessionId()](integration-server-sdk-unreal-ref-actions.md#integration-server-sdk-unreal-ref-getgamesessionid) 返回采用 ARN 格式的标识符。  
类型： FString  
是否必需：是

**MatchmakingConfigurationArn**  
采用 ARN 格式的唯一标识符，适用于用于此请求的对战构建器。要查找用于创建原始游戏会话的对战构建器，请查看对战构建器数据属性中的游戏会话对象。在[使用对战构建器数据](https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-server.html#match-server-data)中了解有关对战构建器数据的更多信息。  
类型： FString  
是否必需：是

**玩家**  
一组表示当前正在游戏会话中的所有玩家的数据。对战构建器使用此信息搜索与当前玩家非常匹配的新玩家。有关玩家对象格式的描述，请参阅《Amazon GameLift Servers API 参考指南》**。要查找玩家属性和团队分配，请在游戏会话对象的匹配器数据属性中查找。 IDs如果对战构建器使用了延迟，则收集当前区域中更新的延迟并将其包含在每个玩家的数据中。  
键入： TArray[< FPlayer >](https://docs.aws.amazon.com/gamelift/latest/apireference/API_Player.html)  
是否必需：是

**TicketId**  
对战或匹配回填请求票证的唯一标识符。如果此处未提供任何值，则 Amazon GameLift Servers 将生成一个采用 UUID 形式的值。使用此标识符可跟踪对战回填票证状态或取消请求（如需要）。  
类型： FString  
必需：否

## FStopMatchBackfillRequest
<a name="integration-server-sdk-unreal-ref-dataypes-stopmatchbackfillrequest"></a>

此数据类型用于取消对战回填请求。此信息在 [StopMatchBackfill()](integration-server-sdk-unreal-ref-actions.md#integration-server-sdk-unreal-ref-stopmatchbackfill) 调用中传递给 Amazon GameLift Servers 服务。

### 内容
<a name="integration-server-sdk-unreal-ref-dataypes-stopbackfill-contents"></a>

**GameSessionArn**  
与被取消的请求关联的唯一游戏会话标识符。  
类型： FString  
是否必需：是

**MatchmakingConfigurationArn**  
此请求发送到的对战构建器的唯一标识符。  
类型： FString  
是否必需：是

**TicketId**  
要取消的回填请求票证的唯一标识符。  
类型： FString  
是否必需：是

[适用于 Amazon GameLift Servers 的服务器 SDK（Unreal）– 数据类型](integration-server-sdk-unreal-ref-datatypes.md)

**Topics**
+ [适用于 Amazon GameLift Servers 的服务器 SDK（Unreal）– 数据类型](integration-server-sdk-unreal-ref-datatypes.md)
+ [AcceptPlayerSession()](#integration-server-sdk-unreal-ref-acceptplayersession)
+ [ActivateGameSession()](#integration-server-sdk-unreal-ref-activategamesession)
+ [DescribePlayerSessions()](#integration-server-sdk-unreal-ref-describeplayersessions)
+ [GetGameSessionId()](#integration-server-sdk-unreal-ref-getgamesessionid)
+ [GetInstanceCertificate()](#integration-server-sdk-unreal-ref-getinstancecertificate)
+ [GetSdkVersion()](#integration-server-sdk-unreal-ref-getsdk)
+ [InitSDK()](#integration-server-sdk-unreal-ref-initsdk)
+ [ProcessEnding()](#integration-server-sdk-unreal-ref-processending)
+ [ProcessReady()](#integration-server-sdk-unreal-ref-processready)
+ [RemovePlayerSession()](#integration-server-sdk-unreal-ref-removeplayersession)
+ [StartMatchBackfill()](#integration-server-sdk-unreal-ref-startmatchbackfill)
+ [StopMatchBackfill()](#integration-server-sdk-unreal-ref-stopmatchbackfill)
+ [TerminateGameSession()](#integration-server-sdk-unreal-ref-terminategamesession)
+ [UpdatePlayerSessionCreationPolicy()](#integration-server-sdk-unreal-ref-updateplayersessioncreationpolicy)

## AcceptPlayerSession()
<a name="integration-server-sdk-unreal-ref-acceptplayersession"></a>

通知 Amazon GameLift Servers 服务，具有所指定玩家会话 ID 的玩家已连接到服务器进程并且需要验证。Amazon GameLift Servers 将验证该玩家会话 ID 是否有效，即该玩家 ID 是否已在游戏会话中预留玩家位置。通过验证后，Amazon GameLift Servers 将玩家位置的状态从 RESERVED 更改为 ACTIVE。

### 语法
<a name="integration-server-sdk-unreal-ref-acceptplayersession-syntax"></a>

```
FGameLiftGenericOutcome AcceptPlayerSession(const FString& playerSessionId)
```

### 参数
<a name="integration-server-sdk-unreal-ref-acceptplayersession-parameter"></a>

**playerSessionId**  
Amazon GameLift Servers服务为响应 AWS SDK Amazon GameLift Servers API 操作调用而颁发的唯一 ID [CreatePlayerSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreatePlayerSession.html)。连接到服务器进程时，游戏客户端会引用此 ID。  
类型： FString  
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-acceptplayersession-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## ActivateGameSession()
<a name="integration-server-sdk-unreal-ref-activategamesession"></a>

通知 Amazon GameLift Servers 服务，服务器进程已激活游戏会话，现在已准备好接收玩家连接。此操作应作为 `onStartGameSession()` 回调函数的一部分，在所有游戏会话初始化已完成之后调用。

### 语法
<a name="integration-server-sdk-unreal-ref-activategamesession-syntax"></a>

```
FGameLiftGenericOutcome ActivateGameSession()
```

### 参数
<a name="integration-server-sdk-unreal-ref-activategamesession-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-activategamesession-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## DescribePlayerSessions()
<a name="integration-server-sdk-unreal-ref-describeplayersessions"></a>

检索玩家会话数据，包括设置、会话元数据和玩家数据。使用此操作获取单个玩家会话的信息、游戏会话中所有玩家会话的信息或者与单个玩家 ID 相关联的所有玩家会话的信息。

### 语法
<a name="integration-server-sdk-unreal-ref-describeplayersessions-syntax"></a>

```
FGameLiftDescribePlayerSessionsOutcome DescribePlayerSessions(const FGameLiftDescribePlayerSessionsRequest &describePlayerSessionsRequest)
```

### 参数
<a name="integration-server-sdk-unreal-ref-describeplayersessions-parameter"></a>

**describePlayerSessions请求**  
[FDescribePlayerSessionsRequest](integration-server-sdk-unreal-ref-datatypes.md#integration-server-sdk-unreal-ref-dataypes-playersessions) 对象描述要检索的玩家会话。  
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-describeplayersessions-return"></a>

如果成功，将返回一个 [FDescribePlayerSessionsRequest](integration-server-sdk-unreal-ref-datatypes.md#integration-server-sdk-unreal-ref-dataypes-playersessions) 对象，包含一组与请求参数相匹配的玩家会话对象。玩家会话对象的结构与 AWS SDK Amazon GameLift Servers API [PlayerSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_PlayerSession.html)数据类型相同。

## GetGameSessionId()
<a name="integration-server-sdk-unreal-ref-getgamesessionid"></a>

检索当前由服务器进程托管的游戏会话的 ID (如果服务器进程处于活动状态)。

### 语法
<a name="integration-server-sdk-unreal-ref-getgamesessionid-syntax"></a>

```
FGameLiftStringOutcome GetGameSessionId()
```

### 参数
<a name="integration-server-sdk-unreal-ref-getgamesessionid-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-getgamesessionid-return"></a>

如果成功，以 `FGameLiftStringOutcome` 对象返回游戏会话 ID。如果不成功，将返回错误消息。

## GetInstanceCertificate()
<a name="integration-server-sdk-unreal-ref-getinstancecertificate"></a>

检索与队列及其实例关联的 PEM 编码 TLS 证书的文件位置。 AWS Certificate Manager 当您在证书配置设置为 GENERATED 的情况下创建新队列时，将生成此证书。使用此证书可与游戏客户端建立安全连接并加密客户端/服务器通信。

### 语法
<a name="integration-server-sdk-unreal-ref-getinstancecertificate-syntax"></a>

```
FGameLiftGetInstanceCertificateOutcome GetInstanceCertificate()
```

### 参数
<a name="integration-server-sdk-unreal-ref-getinstancecertificate-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-getinstancecertificate-return"></a>

如果成功，则返回一个 `GetInstanceCertificateOutcome` 对象，该对象包含实例集的 TLS 证书文件的位置（该证书文件存储在实例上）。从证书链中提取的根证书文件也存储在实例上。如果不成功，将返回错误消息。

有关证书和证书链数据的更多信息，请参阅 AWS Certificate Manager API 参考中的[GetCertificate 响应元素](https://docs.aws.amazon.com/acm/latest/APIReference/API_GetCertificate.html#API_GetCertificate_ResponseElements)。

## GetSdkVersion()
<a name="integration-server-sdk-unreal-ref-getsdk"></a>

返回当前内置到服务器进程中的开发工具包的版本号。

### 语法
<a name="integration-server-sdk-unreal-ref-getsdk-syntax"></a>

```
FGameLiftStringOutcome GetSdkVersion();
```

### 参数
<a name="integration-server-sdk-unreal-ref-getsdk-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-getsdk-return"></a>

如果成功，返回以 `FGameLiftStringOutcome` 对象返回当前 SDK 的版本。返回的字符串仅包含版本号 (例如：如果不成功，将返回错误消息。

### 示例
<a name="integration-server-sdk-unreal-ref-getsdk-example"></a>

```
Aws::GameLift::AwsStringOutcome SdkVersionOutcome = 
    Aws::GameLift::Server::GetSdkVersion();
```

## InitSDK()
<a name="integration-server-sdk-unreal-ref-initsdk"></a>

初始化 Amazon GameLift Servers 开发工具包。应在启动之后、进行任何其他 Amazon GameLift Servers 相关的初始化之前调用此方法。

### 语法
<a name="integration-server-sdk-unreal-ref-initsdk-syntax"></a>

```
FGameLiftGenericOutcome InitSDK()
```

### 参数
<a name="integration-server-sdk-unreal-ref-initsdk-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-initsdk-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## ProcessEnding()
<a name="integration-server-sdk-unreal-ref-processending"></a>

通知 Amazon GameLift Servers 服务，该服务器进程正在关闭。应在所有其他清除任务 (包括关闭所有活动游戏会话) 之后调用此方法。此方法应退出，退出代码为 0；非零退出代码将导致生成一条事件消息，提示进程未完全退出。

### 语法
<a name="integration-server-sdk-unreal-ref-processending-syntax"></a>

```
FGameLiftGenericOutcome ProcessEnding()
```

### 参数
<a name="integration-server-sdk-unreal-ref-processending-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-processending-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## ProcessReady()
<a name="integration-server-sdk-unreal-ref-processready"></a>

通知 Amazon GameLift Servers 服务，服务器进程已准备好托管游戏会话。在成功调用 [InitSDK()](#integration-server-sdk-unreal-ref-initsdk) 并完成了服务器进程托管游戏会话所需的全部设置任务后，应调用此方法。每个进程只能调用一次此方法。

### 语法
<a name="integration-server-sdk-unreal-ref-processready-syntax"></a>

```
FGameLiftGenericOutcome ProcessReady(FProcessParameters &processParameters)
```

### 参数
<a name="integration-server-sdk-unreal-ref-processready-parameter"></a>

**FProcess参数**  
[FProcess参数](integration-server-sdk-unreal-ref-datatypes.md#integration-server-sdk-unreal-ref-dataypes-process) 对象，用于传输有关服务器进程的以下信息：  
+ 游戏服务器代码中实现的回调方法的名称，Amazon GameLift Servers 服务调用其与服务器进程通信。
+ 服务器进程正在侦听的端口号。
+ 您希望 Amazon GameLift Servers 捕获和存储的任何游戏会话特定文件的路径。
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-processready-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

### 示例
<a name="integration-server-sdk-unreal-ref-processready-example"></a>

请参阅[使用 Unreal Engine 插件](integration-engines-setup-unreal.md#integration-engines-setup-unreal-code)中的示例代码。

## RemovePlayerSession()
<a name="integration-server-sdk-unreal-ref-removeplayersession"></a>

通知 Amazon GameLift Servers 服务，具有所指定玩家会话 ID 的玩家已从服务器进程断开连接。作为响应，Amazon GameLift Servers 将玩家位置更改为可用，这使得该玩家位置可以分配给新玩家。

### 语法
<a name="integration-server-sdk-unreal-ref-removeplayersession-syntax"></a>

```
FGameLiftGenericOutcome RemovePlayerSession(const FString& playerSessionId)
```

### 参数
<a name="integration-server-sdk-unreal-ref-removeplayersession-parameter"></a>

**playerSessionId**  
Amazon GameLift Servers服务为响应 AWS SDK Amazon GameLift Servers API 操作调用而颁发的唯一 ID [CreatePlayerSession](https://docs.aws.amazon.com/gamelift/latest/apireference/API_CreatePlayerSession.html)。连接到服务器进程时，游戏客户端会引用此 ID。  
类型： FString  
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-removeplayersession-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## StartMatchBackfill()
<a name="integration-server-sdk-unreal-ref-startmatchbackfill"></a>

发送请求以为使用 FlexMatch 创建的游戏会话中的开放位置查找新玩家。另请参阅 S AWS DK 操作 [StartMatchBackfill()](https://docs.aws.amazon.com/gamelift/latest/apireference/API_StartMatchBackfill.html)。通过此操作，托管游戏会话的游戏服务器进程可以发出匹配回填请求。了解有关 [FlexMatch 回填功能](https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html)的更多信息。

此操作为异步操作。如果成功匹配了新玩家，则 Amazon GameLift Servers 服务会使用回调函数 `OnUpdateGameSession()` 提供更新的对战构建器数据。

服务器进程每次只能具有一个活动的对战回填请求。要发送新请求，请先调用 [StopMatchBackfill()](#integration-server-sdk-unreal-ref-stopmatchbackfill) 以取消原始请求。

### 语法
<a name="integration-server-sdk-unreal-ref-startmatchbackfill-syntax"></a>

```
FGameLiftStringOutcome StartMatchBackfill (FStartMatchBackfillRequest &startBackfillRequest);
```

### 参数
<a name="integration-server-sdk-unreal-ref-startmatchbackfill-parameter"></a>

**FStartMatchBackfillRequest**  
一个 [FStartMatchBackfillRequest](integration-server-sdk-unreal-ref-datatypes.md#integration-server-sdk-unreal-ref-dataypes-startmatchbackfillrequest) 对象，用于传递以下信息：  
+ 要分配给回填请求的票证 ID。此信息是可选的；如果未提供任何 ID，则 Amazon GameLift Servers 将自动生成一个 ID。
+ 要将请求发送到的对战构建器。需要完整的配置 ARN。可从游戏会话的对战构建器数据中获得此值。
+ 正在进行回填的游戏会话的 ID。
+ 游戏会话的当前玩家的可用对战数据。
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-startmatchbackfill-return"></a>

如果成功，将返回对战回填票证作为 `FGameLiftStringOutcome` 对象。如果不成功，将返回错误消息。可以使用 AWS SDK 操作 [DescribeMatchmaking()](https://docs.aws.amazon.com/gamelift/latest/apireference/API_DescribeMatchmaking.html) 跟踪票证状态。

## StopMatchBackfill()
<a name="integration-server-sdk-unreal-ref-stopmatchbackfill"></a>

取消使用 [StartMatchBackfill()](#integration-server-sdk-unreal-ref-startmatchbackfill) 创建的活动对战回填请求。另请参阅 S AWS DK 操作 [StopMatchmaking()](https://docs.aws.amazon.com/gamelift/latest/apireference/API_StopMatchmaking.html)。了解有关 [FlexMatch 回填功能](https://docs.aws.amazon.com/gamelift/latest/flexmatchguide/match-backfill.html)的更多信息。

### 语法
<a name="integration-server-sdk-unreal-ref-stopmatchbackfill-syntax"></a>

```
FGameLiftGenericOutcome StopMatchBackfill (FStopMatchBackfillRequest &stopBackfillRequest);
```

### 参数
<a name="integration-server-sdk-unreal-ref-stopmatchbackfill-parameter"></a>

**StopMatchBackfillRequest**  
一个 [FStopMatchBackfillRequest](integration-server-sdk-unreal-ref-datatypes.md#integration-server-sdk-unreal-ref-dataypes-stopmatchbackfillrequest) 对象，用于识别要取消的对战票证：  
+ 分配给被取消的回填请求的票证 ID
+ 回填请求所发送到的对战构建器
+ 与回填请求关联的游戏会话
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-stopmatchbackfill-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## TerminateGameSession()
<a name="integration-server-sdk-unreal-ref-terminategamesession"></a>

**此方法在版本 4.0.1 中已弃用。相反，服务器进程应在游戏会话结束[ProcessEnding()](#integration-server-sdk-unreal-ref-processending)后调用。**

通知 Amazon GameLift Servers 服务，服务器进程已结束当前游戏会话。当服务器进程保持活动状态并准备托管新游戏会话时，将调用此操作。只有在游戏会话终止程序完成后才应调用此操作，因为它会向 Amazon GameLift Servers 发出信号，表明服务器进程可以立即用于托管新的游戏会话。

如果服务器进程将在游戏会话停止后关闭，则不会调用此操作。取而代之的是，调用[ProcessEnding()](#integration-server-sdk-unreal-ref-processending)表示游戏会话和服务器进程都将结束。

### 语法
<a name="integration-server-sdk-unreal-ref-terminategamesession-syntax"></a>

```
FGameLiftGenericOutcome TerminateGameSession()
```

### 参数
<a name="integration-server-sdk-unreal-ref-terminategamesession-parameter"></a>

此操作没有参数。

### 返回值
<a name="integration-server-sdk-unreal-ref-terminategamesession-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。

## UpdatePlayerSessionCreationPolicy()
<a name="integration-server-sdk-unreal-ref-updateplayersessioncreationpolicy"></a>

更新当前游戏会话接受新玩家会话的能力。可将游戏会话设置为接受或拒绝所有新的玩家会话。(另请参阅 [`UpdateGameSession()` 服务 API 参考](https://docs.aws.amazon.com/gamelift/latest/apireference/API_UpdateGameSession.html) 中的 *Amazon GameLift Servers* 操作)。

### 语法
<a name="integration-server-sdk-unreal-ref-updateplayersessioncreationpolicy-syntax"></a>

```
FGameLiftGenericOutcome UpdatePlayerSessionCreationPolicy(EPlayerSessionCreationPolicy policy)
```

### 参数
<a name="integration-server-sdk-unreal-ref-updateplayersessioncreationpolicy-parameter"></a>

**Policy**  
指示游戏会话是否接受新玩家的值。  
类型：`EPlayerSessionCreationPolicy` 枚举。有效值包括：  
+ **ACCEPT\$1ALL** - 接受所有新玩家会话。
+ **DENY\$1ALL** - 拒绝所有新玩家会话。
是否必需：是

### 返回值
<a name="integration-server-sdk-unreal-ref-updateplayersessioncreationpolicy-return"></a>

返回由成功或失败组成的通用结果，并显示错误消息。