how do client handle duplicated login?

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

crimsonfantasy
Posts: 13
Joined: 21 Feb 2018, 03:02

how do client handle duplicated login?

Postby crimsonfantasy » 11 Apr 2018, 09:38

Hi all:
About duplicated login, I implemented customize login.
I can see logs "User already logged in. Disconnecting previous instance" in server.
However, I want client can handle "duplicated login situation", and show Message on UI to user "your account is used by another one!!".
I add event listener on CONNECTION_LOST.
But when system disconnecting previous instance, the message client fetched by CONNECTION_LOST event is "UNKNOWN";
How can I handle above situation? Thank you.
User avatar
Lapo
Site Admin
Posts: 22999
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: how do client handle duplicated login?

Postby Lapo » 11 Apr 2018, 16:18

Hi,
sorry this is not supported. However it seems a bit obvious that if the same user has logged in twice the previous session will be kicked.
Personally I am not sure the message is very useful, but I might be wrong.

Imagine the situation: I am playing the game on my computer, then I decide to go away and continue play on my phone. I wouldn't even see the error on the computer.

Even if you still were in front of your computer when you decide to play on your phone, it should come as no surprise that you're being kicked from the other session.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 25 guests