my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Post here your questions about the HTML5 / JavaScript for SFS2X

Moderators: Lapo, Bax

nik0990
Posts: 76
Joined: 23 Dec 2016, 10:48
Location: India

my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby nik0990 » 19 Jun 2017, 10:14

Hi,

I have an issue of disconnection but it only occurs on Live(I suppose due to my server is placed in the USA and I am accessing in INDIA having 250 to 400 ms PING_PONG).

Today I connected my mobile device to check and find that my Local Ip connected client on mobile also showing disconnection and having more than 1000 ms PING_PONG.

Can anyone tell me what is wrong here? This code is working on PC browser and having 1.2 to 1.3ms PING_PONG(same code).

Thanks in advance
nik0990
Posts: 76
Joined: 23 Dec 2016, 10:48
Location: India

Re: my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby nik0990 » 19 Jun 2017, 10:17

I have card base multiplayer game.
For disconnection, I am using a command to check whether I am connected or not and after 3 command miss by client, client show disconnection pop-up and start reconnection and I setup server that
<userReconnectionSeconds>10</userReconnectionSeconds>
<overrideMaxUserIdleTime>30</overrideMaxUserIdleTime>
nik0990
Posts: 76
Joined: 23 Dec 2016, 10:48
Location: India

Re: my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby nik0990 » 19 Jun 2017, 10:24

My Local Ip connected Mobile sending me connected command in 10 sec and sometimes in 5 seconds. The ideal client must send server connected command in each 5 second.

I have no idea what is going on. :( :) :shock:
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby Lapo » 19 Jun 2017, 15:45

Hi,
I am not sure I understand.
You have a mobile device that connects to localhost and has 1000ms of lag? That doesn't right.

Are you sure you're connecting via wifi?

Also, this setting:
<overrideMaxUserIdleTime>30</overrideMaxUserIdleTime>

seems too low. You're allowing only 30 secs of idle time before a user is disconnected. That's pretty low. By default we allow 5 minutes (300 secs)

cheers
Lapo
--
gotoAndPlay()
...addicted to flash games
nik0990
Posts: 76
Joined: 23 Dec 2016, 10:48
Location: India

Re: my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby nik0990 » 21 Jun 2017, 10:02

Are you sure you're connecting via wifi?

Yes I am connected with wifi.

seems too low. You're allowing only 30 secs of idle time before a user is disconnected. That's pretty low. By default we allow 5 minutes (300 secs)
For multiplayer card game i think it is ok.
User avatar
Lapo
Site Admin
Posts: 23008
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: my local Ip connected Mobile showing ping pong more than 600 ms in smartfoxserver 2x

Postby Lapo » 21 Jun 2017, 10:16

Hmm, allow me to disagree :)
30 seconds is pretty short. If a user gets distracted it's pretty easy to let 30 seconds slip by and be kicked out.
Additionally a card game suggests a turn based game, so if users have to wait for their turns 30 seconds sounds really too low.

Moreover I don't think there's a real use case for such a strict timing. What harm can be done if a User is not kicked out after 30sec but instead after 2-3 minutes?

My suggestion is to allow more tolerance and set the Idle Timeout to at least 2 minutes. You'll very likely see an improvement with the disconnection issue.

As regards the latency via Wifi I have no idea, sorry. Whatever latency you're seeing it's not coming SmartFoxServer, I can guarantee that. (Unless you're doing some really nasty stuff in your Extension code). Where exactly to look for, I don't know. Either your wifi network is badly configured, or there's something else going on that is not accounted for.

Maybe I'd start by testing with a ping command from your server to the client (via the same wifi) and see what you get.

If you have more details let us know.
Lapo

--

gotoAndPlay()

...addicted to flash games

Return to “SFS2X HTML5 / JavaScript API”

Who is online

Users browsing this forum: No registered users and 20 guests