RTC Forums

Subscription => Support => Topic started by: HelgeLange on February 05, 2017, 05:30:59 PM



Title: Ping is always sent
Post by: HelgeLange on February 05, 2017, 05:30:59 PM
Hello Danijel,

I have a small question :
It looks like although I send en regular intervals data, the ping will be sent anyway, which increases communication and load unnecessarily. Since Ping should be used (in my opinion) to make sure the connections stays alive and nothing more, which it will do anyway since I send in regular intervals of 30 seconds atm. an update. The session timeout is at 120 seconds. I should not need a ping. But I am changing some code to make it more efficient for the release and want to send these updates not every 30 seconds (GPS position) but when the position changes at least 10m.
But I think the ping is sent anyway even though I just sent an update.

Could it be possible to configure the ping that way, that the ping timer resets the moment the connection as used successfully?

Greetings,
Helge


Title: Re: Ping is always sent
Post by: D.Tkalcec (RTC) on February 05, 2017, 06:17:30 PM
Which component(s) are you using and how did you implement this "PING"?

Best Regards,
Danijel Tkalcec


Title: Re: Ping is always sent
Post by: HelgeLange on February 05, 2017, 06:55:01 PM
RtcClientModule.OnPing on the client side
Server side uses RtcServerModule and I use a RtcFunction there to receive the ping and send an answer.

Helge


Title: Re: Ping is always sent
Post by: D.Tkalcec (RTC) on February 05, 2017, 07:30:39 PM
I've figured this might be the case and went to check how the "AutoSessionsPing" feature was implemented in the TRtcClientModule component. To make a long story short, the old implementation was skipping a "PING" call if the connection was busy when the "PING" timer fired. That's obviously not how it should be, so ... I've updated the TRtcClientModule component now to reset the "PING" timer with every remote function call prepared for the Server instead of skipping "PING" calls, which should give you the expected behavior.

The updated RealThinClient SDK (v7.76) is now available for download.

Best Regards,
Danijel Tkalcec


Title: Re: Ping is always sent
Post by: HelgeLange on February 05, 2017, 07:46:55 PM
Thanks, awesome work, mate!