跳到主要内容

Client ClientSDK API Reference

Client sdk api.

API List

APIDescription
InitConfigInit config for PGOS service Note: InitSdk/InitConfig/Tick/Destroy must be called on the main thread.
GetConfigGet configuration value of the specified key, except for "secret_key".
GetSDKVersionGet current PGOS SDK version.

API Details

InitConfig

Init config for PGOS service Note: InitSdk/InitConfig/Tick/Destroy must be called on the main thread.

/**
* Init config for PGOS service
* Note: InitSdk/InitConfig/Tick/Destroy must be called on the main thread.
*
* @param Cfgs A configuration consisting of key/value pairs, such as "title_id", "secret_key", and others.
*/
void InitConfig(
const TMap<FString, FString>& Cfgs) const;

Parameters:

ParamTypeDescription
Cfgsconst TMap<FString, FString>&A configuration consisting of key/value pairs, such as "title_id", "secret_key", and others.

Return: void

GetConfig

Get configuration value of the specified key, except for "secret_key".

/**
* Get configuration value of the specified key, except for "secret_key".
*
* @param CfgKey The specified key, such as "title_id", "log_level", and others.
* @return The configuration value of the specified key.
*/
FString GetConfig(
const FString& CfgKey) const;

Parameters:

ParamTypeDescription
CfgKeyconst FString&The specified key, such as "title_id", "log_level", and others.

Return: FString

The configuration value of the specified key.

GetSDKVersion

Get current PGOS SDK version.

/**
* Get current PGOS SDK version.
*
* @return PGOS SDK version string.
*/
FString GetSDKVersion() const;

Parameters:

(No parameters)

Return: FString

PGOS SDK version string.