TSNet error 6
Sannyasin Brahmanathaswami
brahma at hindu.org
Sat Sep 2 00:21:30 EDT 2017
Ralph
I'm just about to implement this in our new app.
I was only checking on init and some other navigation points in the app, but it's clear now we have to check *everytime* we call the server. because, as you say, use can walk from his desk (wifi) to outside (drop to bad 3G) and then out into the open (suddenly gets 3 bars LTE) and the to the café (back up with 5 bar wifi)
all in a 10 minute walk!
how do you "see if…( it is) fast enough"
is the assumption that if you get something in under 2000 milliseconds than things should work OK, or are you tracking some packet stream?
Also why not just put a text file on the server
https://www.mydomain.com/ping.text
with the word "true"
Apple does this this… but their little static page just has the word "success" returned.
does your script give some advantage?
Brahmanathswami
On 9/1/17, 11:10 AM, "use-livecode on behalf of Ralph DiMola via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:
The first thing I do before any network access is to ping my server with a
https request to a LC backend server script that returns "OK". I set the
timeout for 2 seconds. If the returned data is not "OK" or take more than 2
seconds then I put the app into off-line mode. I try to ping the server
every time the users does "x" or the user's action again need network access
and see if the network is back online or fast enough.
More information about the use-livecode
mailing list