How can I use DescribePlayerSessions() for C++?

Hi All

I’m trying to apply DescribePlayerSessions() for C++ into my project using UE4 because if a user doesn’t join a dedicated server after the user is matched by FlexMatch, status of the user’s player session is in “RESERVED” for 1 minute and a new user is unable to be matched since FlexMatch knows the user will join the dedicated server. That’s why I’m applying DescribePlayerSessions() to find player sessions which are in “RESERVED” status to terminate. For example, I set up a matchmaking rule which maximum and minimum number of players are 5. However, After all users are matched by FlexMatch, only 4 users join a dedicated server and 1 user close his/her client by Alt + F4.

Unfortunately, DescribePlayerSessions function is not on GameLiftServerSDK for UE4 but it’s on GameLiftServerSDK for C++. Anyway, after putting it into my project, I encountered that CreationTime of a player session was weird.

PlayerSession on a document of GameLift explains it in a box below.

Time stamp indicating when this data object was created. Format is a number expressed in Unix time as milliseconds (for example "1469498468.057").
Type: Timestamp
Required: No

It may seem to be as if a value of it is wrong. After the function is called, I displayed the value of CreationTime. So How can I use it? I want a reserved user to be removed with 20 secs.

2580164921 => this value is in CreationTime. It's based on milliseconds.
1557358324 => this value is correct UNIX Epoch. However, it's based on seconds but not milliseconds
The value of CreationTime is much bigger than real UNIX Epoch.

Any help is appreciated.

First, apologies, I filled a backlog request to get this added to the unreal plugin as it should be there.

Secondly, yes the epoch times look very strange (would be sometime in 2056). Do you have a gamesession id to share? Would like to just double check the date is good in the source data first.

I’m sorry to be late. GameSessionId is “arn:aws:gamelift:us-west-2::gamesession/fleet-bdd44dcc-3356-437a-aa14-654f14c10618/f959b32f-7982-4696-8360-3912a0f1acf7”. Thank you very much.