Maintain Connection

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

Moderators: Lapo, Bax

malih
Posts: 3
Joined: 10 Jul 2018, 02:08

Maintain Connection

Postby malih » 10 Jul 2018, 02:13

Hi

I'm using SmartFoxServer for my Online Mobile Game.
I want to ask, how to maintain connection so it will keep connecting to server.
Sometimes user got randomly [Socked Closed] on Server. My client automatically reconnecting to server. The reconnection phase is working. But it's really annoying to show [Loading Animation] in the middle of the battle.
Anyway, I'm using EnableLagMonitor and sync time every 15 seconds.

Any Idea?

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

Re: Maintain Connection

Postby Lapo » 10 Jul 2018, 10:53

Hi,
the LagMonitor should be enough to keep the connection up, although unfortunately mobile connections at times can be very erratic.
Maybe you could try to lower the time of the monitor to 5 seconds and see if it improves the situation.

Normally (as in 85% of the cases) your client should have no problems and not get disconnected. If you have more than 15% of clients with connection issues you may have to check for other factors, such as the location of your hosting provider, the amount of available bandwidth, the packet rate of the game etc...

These factors may also play a role in the disconnections, especially if they are frequent.

Cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
malih
Posts: 3
Joined: 10 Jul 2018, 02:08

Re: Maintain Connection

Postby malih » 11 Jul 2018, 16:35

Hi Lapo

I will try to set monitor time to 5 seconds. and see what happens

Thanks!

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 60 guests