Skip to main content

Client Lobby API Reference

The Lobby Service works with the DS Hosting and Management service and provides a way for the game to gather players together to start a battle. A player can create a private lobby to play battles with specific people or create an open lobby which anyone can join. The Lobby Service also provides lobby management, search, text chat, and other features.

API List

APIDescription
CreateLobbyCreate a new lobby
GetLobbyDetailInfoGet detail information of a lobby
GetLobbyBriefInfoGet brief information of a lobby
BatchGetLobbyBriefInfoGet brief information of lobby in batch (max 100 lobbies)
EditLobbyInfoEdit detail information of a lobby, only available for lobby owner
SearchLobbySearch the lobby list @param params The optional filter information when searching the lobby list. Note: If these data are not filled (lobby_id, lobby_config, status, protection), all existing lobbies will be returned.
JoinLobbyJoin the specified lobby
QuickJoinLobbyPGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success. Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.
JoinLobbyWithGroupsJoin the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large. Slot selection within the group follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.
JoinLobbyWithTeamsJoin the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large. When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.
LeaveLobbyLeave current lobby
DismissLobbyDismiss current lobby, only available for lobby owner
KickOutMemberKick out a lobby member, only available for lobby owner
InvitePlayerInvite a player to current lobby
SwitchTeamSlotSwitch to another slot. The operation will be failed if the target slot is already occupied Note that the team slot index starts form 1.
RequestSwitchTeamSlotSwitch team slot with another lobby member. The operation will be failed if the target slot is empty. Note that the team slot index starts form 1.
ConfirmSwitchTeamSlotAgree to swap slots with a lobby member at the specified position. The interface will return a failure if the position of either party in the swap request changes.
RejectSwitchTeamSlotReject a team slot switch request.
TransferOwnershipTransfer the ownership of a lobby to another member, only available for lobby owner
SetLobbyDataUpdate lobby data, only available for lobby owner
SetLobbyGlobalDataUpdate lobby global data, only available for lobby owner
SetLobbyPlayerDataUpdate player lobby data, lobby members can only modify their own custom data.
StartBattleTry to start a battle that contains all lobby members, only available for lobby owner
ReadyForBattleSwitch the READY flag of current lobby member
GetCurrentLobbyDetailGet latest lobby detail information from SDK local cache
SendLobbyChatTextMsgSend a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created
SendLobbyChatCustomMsgSend a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created
ApproveJoinLobbyRequestApprove a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.
RejectJoinLobbyRequestApprove a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.
GetPlayerLobbyInfoGet the player's current lobby information from server.

Event List

EventDescription
OnLobbyMemberJoinedThe event will be triggered when someone joined current lobby.
OnLobbyMemberLeftThe event will be triggered when someone left current lobby.
OnLobbyTeamUpdatedThe event will be triggered when team struct of current lobby changed.
OnLobbyInvitationThe event will be triggered when receive lobby invitations.
OnLobbyDismissThe event will be triggered when current lobby is dismissed.
OnLobbyOwnerTransferredThe event will be triggered when lobby ownership is transferred.
OnLobbyInfoUpdatedThe event will be triggered when current lobby options is changed.
OnLobbyDataUpdatedThe event will be triggered when custom lobby data is changed.
OnLobbyStatusChangedThe event will be triggered when current lobby's status changed.
OnBattleSessionUpdatedThe event will be triggered when the battle session started by current lobby has updated.
OnReceiveLobbyChatMsgThe event will be triggered when receive chat messages from current lobby's chat channel.
OnLobbySwitchTeamSlotRequestThe event will be triggered when another lobby member send a team-slot switch request.
OnLobbySwitchTeamSlotRequestConfirmedThe event will be triggered when a switch request when a team-slot switch request has been confirmed.
OnLobbySwitchTeamSlotRequestRejectedThe event will be triggered when a team-slot switch request has been rejected.
OnLobbyJoinRequestThe event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.
OnLobbyJoinRequestApprovedThe event will be triggered when a join request has been approved by lobby owner.
OnLobbyJoinRequestRejectedThe event will be triggered when a join request has been reject by lobby owner.
OnLobbyGlobalCustomDataUpdatedThe event will be triggered when lobby global custom data updated.
OnLobbyPlayerCustomDataUpdatedThe event will be triggered when lobby player custom data updated.

API Details

CreateLobby

Create a new lobby

/**
* Create a new lobby
*
* @param Params The information needed to create the lobby.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void CreateLobby(
const FPgosClientCreateLobbyParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientCreateLobbyParams&The information needed to create the lobby.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetLobbyDetailInfo

Get detail information of a lobby

/**
* Get detail information of a lobby
*
* @param LobbyId The lobby id to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetLobbyDetailInfo(
const FString& LobbyId,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
LobbyIdconst FString&The lobby id to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetLobbyBriefInfo

Get brief information of a lobby

/**
* Get brief information of a lobby
*
* @param LobbyId The lobby id to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetLobbyBriefInfo(
const FString& LobbyId,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyBriefInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
LobbyIdconst FString&The lobby id to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyBriefInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

BatchGetLobbyBriefInfo

Get brief information of lobby in batch (max 100 lobbies)

/**
* Get brief information of lobby in batch (max 100 lobbies)
*
* @param LobbyIds List of lobby id to query.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void BatchGetLobbyBriefInfo(
const TArray<FString>& LobbyIds,
TFunction<void(const FPgosResult& Ret, const TArray<FPgosClientLobbyBriefInfo>* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
LobbyIdsconst TArray<FString>&List of lobby id to query.
ResultCallbackTFunction<void(const FPgosResult& Ret, const TArray<FPgosClientLobbyBriefInfo>* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

EditLobbyInfo

Edit detail information of a lobby, only available for lobby owner

/**
* Edit detail information of a lobby, only available for lobby owner
*
* @param Params The lobby information that needs to be updated. these data will overwrite the previous data.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void EditLobbyInfo(
const FPgosClientEditLobbyInfoParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientEditLobbyInfoParams&The lobby information that needs to be updated. these data will overwrite the previous data.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SearchLobby

Search the lobby list @param params The optional filter information when searching the lobby list. Note: If these data are not filled (lobby_id, lobby_config, status, protection), all existing lobbies will be returned.

/**
* Search the lobby list
* @param params The optional filter information when searching the lobby list.
*
* Note: If these data are not filled (lobby_id, lobby_config, status, protection),
* all existing lobbies will be returned.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SearchLobby(
const FPgosClientSearchLobbyParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientSearchLobbyResult* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSearchLobbyParams&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientSearchLobbyResult* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

JoinLobby

Join the specified lobby

/**
* Join the specified lobby
*
* @param Params The information needed when join the lobby
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void JoinLobby(
const FPgosClientJoinLobbyParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientJoinLobbyParams&The information needed when join the lobby
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

QuickJoinLobby

PGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success. Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.

/**
* PGOS will attempt to place the player into a lobby instance that meets the lobby global kv data data filtering conditions, note that this operation does not guarantee success.
* Only Lobby instances with 1) status as Waiting, 2) LobbyPrivacy as Visible, and 3) LobbyProtection as FreeAccess can be quickly joined.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void QuickJoinLobby(
const FPgosClientQuickJoinLobbyParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientQuickJoinLobbyParams&
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

JoinLobbyWithGroups

Join the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large. Slot selection within the group follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.

/**
* Join the specified group in the specified lobby. Try to join the specified groups in the lobby according to the specified priority value from small to large.
* Slot selection within the group follows the Team Selection Strategy configuration on the portal.
* The portal's lobby configuration needs to be switched to advanced mode.
*
* @param Params The information needed when join the lobby.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void JoinLobbyWithGroups(
const FPgosClientJoinLobbyWithGroupsParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientJoinLobbyWithGroupsParams&The information needed when join the lobby.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

JoinLobbyWithTeams

Join the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large. When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal. The portal's lobby configuration needs to be switched to advanced mode.

/**
* Join the specified team in the specified lobby. Try to join the specified teams in the lobby according to the specified priority value from small to large.
* When multiple teams have the same priority, slot selection follows the Team Selection Strategy configuration on the portal.
* The portal's lobby configuration needs to be switched to advanced mode.
*
* @param Params The information needed when join the lobby.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void JoinLobbyWithTeams(
const FPgosClientJoinLobbyWithTeamsParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientJoinLobbyWithTeamsParams&The information needed when join the lobby.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

LeaveLobby

Leave current lobby

/**
* Leave current lobby
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void LeaveLobby(
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

DismissLobby

Dismiss current lobby, only available for lobby owner

/**
* Dismiss current lobby, only available for lobby owner
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void DismissLobby(
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

KickOutMember

Kick out a lobby member, only available for lobby owner

/**
* Kick out a lobby member, only available for lobby owner
*
* @param MemberPlayerId The player id of the lobby member.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void KickOutMember(
const FString& MemberPlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
MemberPlayerIdconst FString&The player id of the lobby member.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

InvitePlayer

Invite a player to current lobby

/**
* Invite a player to current lobby
*
* @param PlayerId The invited player id.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void InvitePlayer(
const FString& PlayerId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
PlayerIdconst FString&The invited player id.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SwitchTeamSlot

Switch to another slot. The operation will be failed if the target slot is already occupied Note that the team slot index starts form 1.

/**
* Switch to another slot. The operation will be failed if the target slot is already occupied
* Note that the team slot index starts form 1.
*
* @param TargeteamName The name of team to switch to.
* @param TargeteamSlot The slot of team to switch to.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SwitchTeamSlot(
const FString& TargeteamName,
int32 TargeteamSlot,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
TargeteamNameconst FString&The name of team to switch to.
TargeteamSlotint32The slot of team to switch to.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

RequestSwitchTeamSlot

Switch team slot with another lobby member. The operation will be failed if the target slot is empty. Note that the team slot index starts form 1.

/**
* Switch team slot with another lobby member. The operation will be failed if the target slot is empty.
* Note that the team slot index starts form 1.
*
* @param TargeteamName The name of team to switch to.
* @param TargeteamSlot The slot index of team to switch to.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void RequestSwitchTeamSlot(
const FString& TargeteamName,
int32 TargeteamSlot,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
TargeteamNameconst FString&The name of team to switch to.
TargeteamSlotint32The slot index of team to switch to.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

ConfirmSwitchTeamSlot

Agree to swap slots with a lobby member at the specified position. The interface will return a failure if the position of either party in the swap request changes.

/**
* Agree to swap slots with a lobby member at the specified position.
* The interface will return a failure if the position of either party in the swap request changes.
*
* @param RequestId Team slot switch request id.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void ConfirmSwitchTeamSlot(
const FString& RequestId,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
RequestIdconst FString&Team slot switch request id.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

RejectSwitchTeamSlot

Reject a team slot switch request.

/**
* Reject a team slot switch request.
*
* @param RequestId Team slot switch request id.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void RejectSwitchTeamSlot(
const FString& RequestId,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
RequestIdconst FString&Team slot switch request id.
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

TransferOwnership

Transfer the ownership of a lobby to another member, only available for lobby owner

/**
* Transfer the ownership of a lobby to another member, only available for lobby owner
*
* @param NewOwnerPlayerId The target player id.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void TransferOwnership(
const FString& NewOwnerPlayerId,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
NewOwnerPlayerIdconst FString&The target player id.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetLobbyData

Update lobby data, only available for lobby owner

Deprecated, use SetLobbyGlobalData instead.

/**
* Update lobby data, only available for lobby owner
* [DEPRECATED!!!] SetLobbyData was declared deprecated, consider using SetLobbyGlobalData instead.
*
* @param KvData Lobby data.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetLobbyData(
const TMap<FString, FString>& KvData,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
KvDataconst TMap<FString, FString>&Lobby data.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetLobbyGlobalData

Update lobby global data, only available for lobby owner

/**
* Update lobby global data, only available for lobby owner
*
* @param LobbyGlobalData Lobby global data. Each key-value pair is a string. Special note: When using this parameter to filter room instances (such as in the SearchLobby/QuickJoin interfaces), PGOS supports parsing special string values as lists to enable more complex set-based filtering operations. The string value formats that can be parsed as lists include: [a, b, c] / ["a", "b", "c"] (where the double quotes will be automatically stripped).
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetLobbyGlobalData(
const TMap<FString, FString>& LobbyGlobalData,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
LobbyGlobalDataconst TMap<FString, FString>&Lobby global data. Each key-value pair is a string. Special note: When using this parameter to filter room instances (such as in the SearchLobby/QuickJoin interfaces), PGOS supports parsing special string values as lists to enable more complex set-based filtering operations. The string value formats that can be parsed as lists include: [a, b, c] / ["a", "b", "c"] (where the double quotes will be automatically stripped).
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SetLobbyPlayerData

Update player lobby data, lobby members can only modify their own custom data.

/**
* Update player lobby data, lobby members can only modify their own custom data.
*
* @param LobbyPlayerData Lobby player data.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SetLobbyPlayerData(
const FString& LobbyPlayerData,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
LobbyPlayerDataconst FString&Lobby player data.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

StartBattle

Try to start a battle that contains all lobby members, only available for lobby owner

/**
* Try to start a battle that contains all lobby members, only available for lobby owner
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void StartBattle(
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

ReadyForBattle

Switch the READY flag of current lobby member

/**
* Switch the READY flag of current lobby member
*
* @param Ready The READY flag.
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void ReadyForBattle(
bool Ready,
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ReadyboolThe READY flag.
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetCurrentLobbyDetail

Get latest lobby detail information from SDK local cache

/**
* Get latest lobby detail information from SDK local cache
*
* @param Dst The latest lobby detail information
* @return false if not in a lobby, or don't get the detail information of the current lobby
*/
bool GetCurrentLobbyDetail(
FPgosClientLobbyDetailInfo& Dst) const;

Parameters:

ParamTypeDescription
DstFPgosClientLobbyDetailInfo&The latest lobby detail information

Return: bool

false if not in a lobby, or don't get the detail information of the current lobby

SendLobbyChatTextMsg

Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created

/**
* Send a message to the lobby's chat channel.
* Only enable_chatting in CreateLobbyParams is True when the lobby was created
*
* @param Params Request struct for sending lobby chat message
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SendLobbyChatTextMsg(
const FPgosClientSendLobbyChatMsgParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSendLobbyChatMsgParams&Request struct for sending lobby chat message
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

SendLobbyChatCustomMsg

Send a message to the lobby's chat channel. Only enable_chatting in CreateLobbyParams is True when the lobby was created

/**
* Send a message to the lobby's chat channel.
* Only enable_chatting in CreateLobbyParams is True when the lobby was created
*
* @param Params Request struct for sending lobby chat message
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void SendLobbyChatCustomMsg(
const FPgosClientSendLobbyChatMsgParams& Params,
TFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientSendLobbyChatMsgParams&Request struct for sending lobby chat message
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientChatMsgInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

ApproveJoinLobbyRequest

Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.

/**
* Approve a lobby join request.
* The interface is for lobby owner use only. Each request is valid for 10 minutes.
*
* @param Params
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void ApproveJoinLobbyRequest(
const FPgosClientApproveJoinLobbyRequestParams& Params,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientApproveJoinLobbyRequestParams&
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

RejectJoinLobbyRequest

Approve a lobby join request. The interface is for lobby owner use only. Each request is valid for 10 minutes.

/**
* Approve a lobby join request.
* The interface is for lobby owner use only. Each request is valid for 10 minutes.
*
* @param Params
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void RejectJoinLobbyRequest(
const FPgosClientRejectJoinLobbyRequestParams& Params,
TFunction<void(const FPgosResult& Ret)> ResultCallback) const;

Parameters:

ParamTypeDescription
Paramsconst FPgosClientRejectJoinLobbyRequestParams&
ResultCallbackTFunction<void(const FPgosResult& Ret)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

GetPlayerLobbyInfo

Get the player's current lobby information from server.

/**
* Get the player's current lobby information from server.
*
* @param ResultCallback The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.
*/
void GetPlayerLobbyInfo(
TFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)> ResultCallback) const;

Parameters:

ParamTypeDescription
ResultCallbackTFunction<void(const FPgosResult& Ret, const FPgosClientLobbyDetailInfo* Data)>The result callback after the API execution ends, and it will be called in the GAME THREAD. For lifetime safety, it is recommended to use the CreateWeakCallback provided in PgosSDKCpp.h to create a lambda bound to an UObject.

Return: void

Event Details

OnLobbyMemberJoined

The event will be triggered when someone joined current lobby.

/**
* OnLobbyMemberJoined:
* The event will be triggered when someone joined current lobby.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyMemberJoined, const FPgosClientLobbyMemberJoinedEvt& /*Event*/);
FOnLobbyMemberJoined& OnLobbyMemberJoined() { return LobbyMemberJoinedDelegate; }

Type Reference:

OnLobbyMemberLeft

The event will be triggered when someone left current lobby.

/**
* OnLobbyMemberLeft:
* The event will be triggered when someone left current lobby.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyMemberLeft, const FPgosClientLobbyMemberLeftEvt& /*Event*/);
FOnLobbyMemberLeft& OnLobbyMemberLeft() { return LobbyMemberLeftDelegate; }

Type Reference:

OnLobbyTeamUpdated

The event will be triggered when team struct of current lobby changed.

/**
* OnLobbyTeamUpdated:
* The event will be triggered when team struct of current lobby changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyTeamUpdated, const FPgosClientLobbyTeamUpdatedEvt& /*Event*/);
FOnLobbyTeamUpdated& OnLobbyTeamUpdated() { return LobbyTeamUpdatedDelegate; }

Type Reference:

OnLobbyInvitation

The event will be triggered when receive lobby invitations.

/**
* OnLobbyInvitation:
* The event will be triggered when receive lobby invitations.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyInvitation, const FPgosClientLobbyInvitationEvt& /*Event*/);
FOnLobbyInvitation& OnLobbyInvitation() { return LobbyInvitationDelegate; }

Type Reference:

OnLobbyDismiss

The event will be triggered when current lobby is dismissed.

/**
* OnLobbyDismiss:
* The event will be triggered when current lobby is dismissed.
*/
DECLARE_MULTICAST_DELEGATE(FOnLobbyDismiss);
FOnLobbyDismiss& OnLobbyDismiss() { return LobbyDismissDelegate; }

Type Reference:

OnLobbyOwnerTransferred

The event will be triggered when lobby ownership is transferred.

/**
* OnLobbyOwnerTransferred:
* The event will be triggered when lobby ownership is transferred.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyOwnerTransferred, const FPgosClientLobbyOwnerTransferredEvt& /*Event*/);
FOnLobbyOwnerTransferred& OnLobbyOwnerTransferred() { return LobbyOwnerTransferredDelegate; }

Type Reference:

OnLobbyInfoUpdated

The event will be triggered when current lobby options is changed.

/**
* OnLobbyInfoUpdated:
* The event will be triggered when current lobby options is changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyInfoUpdated, const FPgosClientLobbyInfoUpdatedEvt& /*Event*/);
FOnLobbyInfoUpdated& OnLobbyInfoUpdated() { return LobbyInfoUpdatedDelegate; }

Type Reference:

OnLobbyDataUpdated

The event will be triggered when custom lobby data is changed.

/**
* OnLobbyDataUpdated:
* The event will be triggered when custom lobby data is changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyDataUpdated, const FPgosClientLobbyDataUpdatedEvt& /*Event*/);
FOnLobbyDataUpdated& OnLobbyDataUpdated() { return LobbyDataUpdatedDelegate; }

Type Reference:

OnLobbyStatusChanged

The event will be triggered when current lobby's status changed.

/**
* OnLobbyStatusChanged:
* The event will be triggered when current lobby's status changed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyStatusChanged, const FPgosClientLobbyStatusChangedEvt& /*Event*/);
FOnLobbyStatusChanged& OnLobbyStatusChanged() { return LobbyStatusChangedDelegate; }

Type Reference:

OnBattleSessionUpdated

The event will be triggered when the battle session started by current lobby has updated.

/**
* OnBattleSessionUpdated:
* The event will be triggered when the battle session started by current lobby has updated.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnBattleSessionUpdated, const FPgosClientBattleSessionUpdatedEvt& /*Event*/);
FOnBattleSessionUpdated& OnBattleSessionUpdated() { return BattleSessionUpdatedDelegate; }

Type Reference:

OnReceiveLobbyChatMsg

The event will be triggered when receive chat messages from current lobby's chat channel.

/**
* OnReceiveLobbyChatMsg:
* The event will be triggered when receive chat messages from current lobby's chat channel.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnReceiveLobbyChatMsg, const FPgosClientReceiveLobbyChatMsgEvt& /*Event*/);
FOnReceiveLobbyChatMsg& OnReceiveLobbyChatMsg() { return ReceiveLobbyChatMsgDelegate; }

Type Reference:

OnLobbySwitchTeamSlotRequest

The event will be triggered when another lobby member send a team-slot switch request.

/**
* OnLobbySwitchTeamSlotRequest:
* The event will be triggered when another lobby member send a team-slot switch request.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbySwitchTeamSlotRequest, const FPgosClientLobbySwitchTeamSlotRequestEvt& /*Event*/);
FOnLobbySwitchTeamSlotRequest& OnLobbySwitchTeamSlotRequest() { return LobbySwitchTeamSlotRequestDelegate; }

Type Reference:

OnLobbySwitchTeamSlotRequestConfirmed

The event will be triggered when a switch request when a team-slot switch request has been confirmed.

/**
* OnLobbySwitchTeamSlotRequestConfirmed:
* The event will be triggered when a switch request when a team-slot switch request has been confirmed.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbySwitchTeamSlotRequestConfirmed, const FPgosClientLobbySwitchTeamSlotRequestConfirmedEvt& /*Event*/);
FOnLobbySwitchTeamSlotRequestConfirmed& OnLobbySwitchTeamSlotRequestConfirmed() { return LobbySwitchTeamSlotRequestConfirmedDelegate; }

Type Reference:

OnLobbySwitchTeamSlotRequestRejected

The event will be triggered when a team-slot switch request has been rejected.

/**
* OnLobbySwitchTeamSlotRequestRejected:
* The event will be triggered when a team-slot switch request has been rejected.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbySwitchTeamSlotRequestRejected, const FPgosClientLobbySwitchTeamSlotRequestRejectedEvt& /*Event*/);
FOnLobbySwitchTeamSlotRequestRejected& OnLobbySwitchTeamSlotRequestRejected() { return LobbySwitchTeamSlotRequestRejectedDelegate; }

Type Reference:

OnLobbyJoinRequest

The event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.

/**
* OnLobbyJoinRequest:
* The event will be triggered when a player request to join a lobby with protection type LobbyProtection::ApplicationNeeded.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyJoinRequest, const FPgosClientLobbyJoinRequestEvt& /*Event*/);
FOnLobbyJoinRequest& OnLobbyJoinRequest() { return LobbyJoinRequestDelegate; }

Type Reference:

OnLobbyJoinRequestApproved

The event will be triggered when a join request has been approved by lobby owner.

/**
* OnLobbyJoinRequestApproved:
* The event will be triggered when a join request has been approved by lobby owner.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyJoinRequestApproved, const FPgosClientLobbyJoinRequestApprovedEvt& /*Event*/);
FOnLobbyJoinRequestApproved& OnLobbyJoinRequestApproved() { return LobbyJoinRequestApprovedDelegate; }

Type Reference:

OnLobbyJoinRequestRejected

The event will be triggered when a join request has been reject by lobby owner.

/**
* OnLobbyJoinRequestRejected:
* The event will be triggered when a join request has been reject by lobby owner.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyJoinRequestRejected, const FPgosClientLobbyJoinRequestRejectedEvt& /*Event*/);
FOnLobbyJoinRequestRejected& OnLobbyJoinRequestRejected() { return LobbyJoinRequestRejectedDelegate; }

Type Reference:

OnLobbyGlobalCustomDataUpdated

The event will be triggered when lobby global custom data updated.

/**
* OnLobbyGlobalCustomDataUpdated:
* The event will be triggered when lobby global custom data updated.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyGlobalCustomDataUpdated, const FPgosClientLobbyGlobalCustomDataUpdatedEvt& /*Event*/);
FOnLobbyGlobalCustomDataUpdated& OnLobbyGlobalCustomDataUpdated() { return LobbyGlobalCustomDataUpdatedDelegate; }

Type Reference:

OnLobbyPlayerCustomDataUpdated

The event will be triggered when lobby player custom data updated.

/**
* OnLobbyPlayerCustomDataUpdated:
* The event will be triggered when lobby player custom data updated.
*
* @param Event Event result.
*/
DECLARE_MULTICAST_DELEGATE_OneParam(FOnLobbyPlayerCustomDataUpdated, const FPgosClientLobbyPlayerCustomDataUpdatedEvt& /*Event*/);
FOnLobbyPlayerCustomDataUpdated& OnLobbyPlayerCustomDataUpdated() { return LobbyPlayerCustomDataUpdatedDelegate; }

Type Reference: