Skip to main content

Update a Session

Last updated on

Call the UpdateGameSession() function to keep the ongoing session's player count updated in real-time.

FString SessionId { "KnownSessionId" };
uint32 MaxPlayer {10};
uint32 CurrentPlayerCount {5};

ApiClient->SessionBrowser.UpdateGameSession(SessionId, MaxPlayer, CurrentPlayerCount,
THandler<FAccelByteModelsSessionBrowserData>::CreateLambda([](const FAccelByteModelsSessionBrowserData& Result)
{
// Do something when request success
}), FErrorHandler::CreateLambda([](const int32 Code, const FString& Msg)
{
// Do something when request error
}));