about reconnection

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

about reconnection

Postby prince_hao » 09 Apr 2015, 08:28

Hi,
I have set reconnection time 120s,now clientA login with testone,then clientB login with the same loginname, the server disconnt clientA in LoginEvent and allow the clientB login.but the clientA crash.How to solve it?
help me.thinks!
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: about reconnection

Postby Lapo » 09 Apr 2015, 15:30

Hi,
what does it mean that client A crashes?

Please describe what happens, which client errors you're getting exactly. Also add which client platform you're using and which version of the SFS2X client API.

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: about reconnection

Postby prince_hao » 10 Apr 2015, 02:46

Lapo wrote:Hi,
what does it mean that client A crashes?

Please describe what happens, which client errors you're getting exactly. Also add which client platform you're using and which version of the SFS2X client API.

Thanks

Hi Lapo,
Thanks for your reply! the client API is C++ 1.1.6
the server disconnt client A and When the breakpoint into SendHandshakeRequest(in SmartFox.cpp) the sessionToken is null.so Client A crashes!
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: about reconnection

Postby Lapo » 10 Apr 2015, 06:25

It sounds like you are trying to re-implement the "force-logout" system.
If you want to disconnect a client to allow another client with the same name this function already exists. It is called "Force Logout" and it is activated in the Zone Configurator.

When User "Kermit" will login any other user with the same name will be logged out automatically.

I don't recommend trying to replicate this manually because it's quite tricky to coordinate.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: about reconnection

Postby prince_hao » 13 Apr 2015, 02:10

Lapo wrote:It sounds like you are trying to re-implement the "force-logout" system.
If you want to disconnect a client to allow another client with the same name this function already exists. It is called "Force Logout" and it is activated in the Zone Configurator.

When User "Kermit" will login any other user with the same name will be logged out automatically.

I don't recommend trying to replicate this manually because it's quite tricky to coordinate.

Thanks

Hi Lapo,
I have to use the the "force-logout" system. But the problem still exists. Is related to I set up the reconnection?
Thanks
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: about reconnection

Postby Lapo » 13 Apr 2015, 07:34

Have you removed you server side code that removes logged in users manually?

Can you give me a step by step description of how to reproduce the problem?
Also can you specify which SmartFoxServer version are you using?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
prince_hao
Posts: 71
Joined: 30 Oct 2010, 04:35

Re: about reconnection

Postby prince_hao » 13 Apr 2015, 07:45

Lapo wrote:Have you removed you server side code that removes logged in users manually?

Can you give me a step by step description of how to reproduce the problem?
Also can you specify which SmartFoxServer version are you using?

Thanks

yeah! I have removed my server side code. server API is 2.9 , client API is C++ 1.1.6.
When User "Kermit" will login any other user with the same name will be logged out automatically.
the logged out client crashes!
the server set reconntcion 120s

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 18 guests