Greetings,
Is there a recommended signout process for the C++ client?
A few things I notice:
-
I use authenticateEmail() with create turned on. When I create a new user that user appears in the player list on the web console. The user has the green “online” flag.
-
if I sign out on my client, using the _client->disconnect() function, the green online flag remains. The presence is still counted in the presence counter in the upper right.
-
If I kill my local app then the online flag reappears.
-
if I sign back in with authenticateEmail() the user does not have the green online flag. But I am definitely getting the AuthSuccess callback from authenticateEmail().
I don’t have much other functionality in my client at the moment, so I’m not sure if the new session is fully operational. But I’m wondering if I’m missing something from my sign in and sign out routines?
I would think that any time i get a success callback from the authenticate function, the web console would show me as online. And then when do _client->disconnect(), I would be offline.
Thanks for any input.
@Mehoo462 status is only affected by a realtime socket connection and if a status is set (see: Status - Heroic Labs Documentation).
Thanks. Is the status your’e referring to the same as what controls the “Online” tag in the Server Console? I added _rtClient->updateStatus(“”); to my update routine, but It didn’t seem to effect the behaviour described above.
If this tag is related to user status, and users have no status when they first connect, why does the tag appear appear upon user creation? I can’t get it to appear on subsequent logins. Not that a little green tag in the user console is that important to me, I just want to understand what’s going on. Thanks!
Okay. I figured this out. The function I need to call when signing out is _rtClient->disconnect();
If i do this, then the user appears offline to the server.
Also my previously created users weren’t appearing online due do some errors on my part. I had some conditions set incorrectly, and wasn’t actually starting the rtClient in my login flow.
In short: If i start the rtClient after authing. And make sure to do rtClient->disconnect(); when signing out then the green flag here behaves as expected.
Thanks for the clue!