Hello,
We can listen onConnectionRetry resume with
sfs.addEventListener(SFSEvent.CONNECTION_RESUME, OnConnectionResume);
But how can we listen retry error? connectionlost not fired, and connection status become true again whitout resume fired.
Best Regards
onConnectionRetry fail listener
Re: onConnectionRetry fail listener
Hi,
I am not sure if I understand your question.
When the reconnection system is active you will get one event called CONNECTION_RETRY when the user's connection is lost and the client is retrying to join the server.
If the operation succeeds you will get a CONNECTION_RESUME event, and the client will be back without having lost his previous state.
Otherwise you will get a CONNECTION_LOST event, signaling that the attempt to reconnect has failed.
The API do not fire events for every single reconnection attempt during the time in which the reconnection is being tried.
cheers
I am not sure if I understand your question.
When the reconnection system is active you will get one event called CONNECTION_RETRY when the user's connection is lost and the client is retrying to join the server.
If the operation succeeds you will get a CONNECTION_RESUME event, and the client will be back without having lost his previous state.
Otherwise you will get a CONNECTION_LOST event, signaling that the attempt to reconnect has failed.
The API do not fire events for every single reconnection attempt during the time in which the reconnection is being tried.
cheers
Re: onConnectionRetry fail listener
Hello,
Thank you very much for your reply.
I try to explain details.
- i login my game
- when i try to login with another browser with same user wihtout closing 1st window.
- new tab or browser open connection and login server
- but old login tab cannot recive connection lost event. it tries to retry but not recieve resume or connection lost event.
- i think it has only get session not logged to server.
Thank you very much for your reply.
I try to explain details.
- i login my game
- when i try to login with another browser with same user wihtout closing 1st window.
- new tab or browser open connection and login server
- but old login tab cannot recive connection lost event. it tries to retry but not recieve resume or connection lost event.
- i think it has only get session not logged to server.
Re: onConnectionRetry fail listener
Can you please specify:
- the SFS2X version
- the API language (AS3, C#, Java. Obj-C ...) and version
- if the "ForceLogout" flag is ON or OFF in your zone
Thanks.
- the SFS2X version
- the API language (AS3, C#, Java. Obj-C ...) and version
- if the "ForceLogout" flag is ON or OFF in your zone
Thanks.
Re: onConnectionRetry fail listener
- the SFS2X version -> 2.9.2
- the API language (AS3, C#, Java. Obj-C ...) and version - > AS3
- if the "ForceLogout" flag is ON or OFF in your zone - > I cannot find any setting for that in zone.xml
also i want to inform that i'm using custom login.
- the API language (AS3, C#, Java. Obj-C ...) and version - > AS3
- if the "ForceLogout" flag is ON or OFF in your zone - > I cannot find any setting for that in zone.xml
also i want to inform that i'm using custom login.
Re: onConnectionRetry fail listener
The ForceLogout is to be found via the AdminTool > ZoneConfigurator > [Your Zone Name]
thanks
thanks
Re: onConnectionRetry fail listener
ForceLogout is On
Thanks
Thanks
Re: onConnectionRetry fail listener
Dear Lapo ,
I checked and ForceLogout is On.
do you have any suggest for me to catch connection retry erro.
I checked and ForceLogout is On.
do you have any suggest for me to catch connection retry erro.
Re: onConnectionRetry fail listener
aliko wrote:- i login my game
- when i try to login with another browser with same user wihtout closing 1st window.
- new tab or browser open connection and login server
- but old login tab cannot recive connection lost event. it tries to retry but not recieve resume or connection lost event.
- i think it has only get session not logged to server.
I tested your scenario and it works fine.
I can login once with name "Lapo", then start a new tab login again with name "Lapo"
At this point the 2nd client is logged in and the 1st is kicked out and he receives the disconnection event.
Maybe you're using an old AS3 API. Make sure you update to the latest version available here:
http://www.smartfoxserver.com/download/sfs2x#p=client
Last version is 1.2.5
Re: onConnectionRetry fail listener
Thank you very much for your great support.
I'm using version 1.0.1 still ))
After updating client api problem fixed.
Best Regards
I'm using version 1.0.1 still ))
After updating client api problem fixed.
Best Regards
Return to “SFS2X ActionScript 3 API”
Who is online
Users browsing this forum: No registered users and 17 guests