Reconnection mechanism

Need help with SmartFoxServer? You didn't find an answer in our documentation? Please, post your questions here!

Moderators: Lapo, Bax

Post Reply
abacus
Posts: 12
Joined: 07 Oct 2008, 10:42

Reconnection mechanism

Post by abacus »

Hi,

How doe we reconnect the user if the user gets disconnected due to network problem? The reconnection mechanism should ensure that the current state of the user is maintained.
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

This is quite a complex subject.
With the current SmartFox version you could implement your own system by making the game state persistent (using a database for example)
When a User is disconnected in the middle of a game you can freeze the game for some time and wait for the User to come back.

If he's able to reconnect within the allowed time frame you will be able to re-load the user state, send it to the client and put him back in the game.

Of course this last part depends a lot on the game logic and type of game (real time, semi-realtime, turn based etc...)

With the next generation of SmartFox we'll be able to provide this feature out of the box, thanks to the new engine we've been working on during the last year. The release is expected in middle 2010, stay tuned :)
Lapo
--
gotoAndPlay()
...addicted to flash games
Post Reply