Loading...
Searching...
No Matches
AccelByte.Server.ServerLobby Class Reference

Lobby utilities. More...

Inheritance diagram for AccelByte.Server.ServerLobby:

Public Member Functions

void WritePartyStorage (string partyId, ResultCallback< PartyDataUpdateNotif > callback, Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier, int retryAttempt=1)
 Write party storage data to the targeted party ID. Beware: Object will not be write immediately, please take care of the original object until it written.
void GetPartyStorage (string partyId, ResultCallback< PartyDataUpdateNotif > callback)
 Get party storage by party ID.
void GetPartyDataByUserId (string userId, ResultCallback< PartyDataUpdateNotif > callback)
 Get active party info by user Id.
void GetSessionAttribute (string userId, string key, ResultCallback< ServerGetSessionAttributeResponse > callback)
 Get a user's session attribute by key.
void GetSessionAttributeAll (string userId, ResultCallback< GetSessionAttributeAllResponse > callback)
 Get all of user's session attribute.
void SetSessionAttribute (string userId, Dictionary< string, string > attributes, ResultCallback callback)
 set a user's session attributes
void SetSessionAttribute (string userId, string key, string value, ResultCallback callback)
 Set a user's session attribute.

Additional Inherited Members

Properties inherited from AccelByte.Core.WrapperBase
Utils.AccelByteIdValidator IdValidator [get]

Detailed Description

Lobby utilities.

Member Function Documentation

◆ GetPartyDataByUserId()

void AccelByte.Server.ServerLobby.GetPartyDataByUserId ( string userId,
ResultCallback< PartyDataUpdateNotif > callback )
inline

Get active party info by user Id.

Parameters
userIdThe user ID to be searched
callbackReturns PartyDataUpdateNotif via callback when party is found

◆ GetPartyStorage()

void AccelByte.Server.ServerLobby.GetPartyStorage ( string partyId,
ResultCallback< PartyDataUpdateNotif > callback )
inline

Get party storage by party ID.

Parameters
partyIdTargeted party ID.
callbackReturns a Result via callback when completed.

◆ GetSessionAttribute()

void AccelByte.Server.ServerLobby.GetSessionAttribute ( string userId,
string key,
ResultCallback< ServerGetSessionAttributeResponse > callback )
inline

Get a user's session attribute by key.

Parameters
userIdthe user ID to be searched
keyThe user's session attribute key
callbackReturns ServerGetSessionAttributeResponse via callback when found"

◆ GetSessionAttributeAll()

void AccelByte.Server.ServerLobby.GetSessionAttributeAll ( string userId,
ResultCallback< GetSessionAttributeAllResponse > callback )
inline

Get all of user's session attribute.

Parameters
userIdthe user ID to be searched
callbackReturns GetSessionAttributeAllResponse via callback when found"

◆ SetSessionAttribute() [1/2]

void AccelByte.Server.ServerLobby.SetSessionAttribute ( string userId,
Dictionary< string, string > attributes,
ResultCallback callback )
inline

set a user's session attributes

Parameters
userIduser Id to be set
attributesthe attributes dictionary to set
callbackReturns result via callback when operation is done

◆ SetSessionAttribute() [2/2]

void AccelByte.Server.ServerLobby.SetSessionAttribute ( string userId,
string key,
string value,
ResultCallback callback )
inline

Set a user's session attribute.

Parameters
userIduser Id to be set
keythe attribute's key
valuethe attribute's value
callbackReturns result via callback when operation is done

◆ WritePartyStorage()

void AccelByte.Server.ServerLobby.WritePartyStorage ( string partyId,
ResultCallback< PartyDataUpdateNotif > callback,
Func< Dictionary< string, object >, Dictionary< string, object > > payloadModifier,
int retryAttempt = 1 )
inline

Write party storage data to the targeted party ID. Beware: Object will not be write immediately, please take care of the original object until it written.

Parameters
partyIdTargeted party ID.
callbackReturns a Result via callback when completed.
payloadModifierFunction to modify the latest party data with your customized modifier.
retryAttemptthe number of retry to do when there is an error in writing to party storage (likely due to write conflicts)