Connection/Reconnection Problem

Post here your questions about the Flash / Flex / Air API for SFS2X

Moderators: Lapo, Bax

arvind
Posts: 34
Joined: 09 Jul 2013, 16:59

Connection/Reconnection Problem

Postby arvind » 08 Nov 2013, 15:06

Hi,
I am creating a poker-game using Flex 4.5 and AIR 3.1. I establish the connection with smartfoxserver once user login into the application, but in between the game play i get a message of connection lost from the smartfoxserver (SFSEvent.CONNECTION_LOST). Sometime the frequency of disconnection from game is very high.

1. Do smartfoxserver try to reconnect automatically or do we need to handle it manually?
2. If it reconnect automatically then how we can track the re-connection process means re-connection status is it connected or not ?
3. For how much time interval and attempts smartfoxserver keeps on trying to reconnect with client?

Please help on this.

Thanks
User avatar
Lapo
Site Admin
Posts: 23026
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Connection/Reconnection Problem

Postby Lapo » 08 Nov 2013, 16:07

Hi,
for starters it would be interesting to understand more about the nature of this "very high frequency of disconnections".

Can you elaborate? How long is a game session on average and how many disconnections do you see?
With an averagely good connection you shouldn't see any disconnections at all.

arvind wrote:Hi,1. Do smartfoxserver try to reconnect automatically or do we need to handle it manually?

By default no, but we provide a specific tool for reconnection.
See here:
http://docs2x.smartfoxserver.com/Gettin ... n-hrc-plus

2. If it reconnect automatically then how we can track the re-connection process means re-connection status is it connected or not ?

See the SFSEvent.CONNECTION_RETRY and SFSEvent.CONNECTION_RESUME events on client side.

3. For how much time interval and attempts smartfoxserver keeps on trying to reconnect with client?

It's the other way around, it's the client that keeps trying to reconnect.
The amount of time is specified by the HRC setting on the server side. See AdminTool > Zone Configurator > User reconnection timeframe

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games

Return to “SFS2X ActionScript 3 API”

Who is online

Users browsing this forum: No registered users and 22 guests