TSNet error 6

Ralph DiMola rdimola at evergreeninfo.net
Sat Sep 2 10:01:44 EDT 2017


Yes I assume that if I get a response in 2000 ms the link is fast enough. The text file should work but seeing I need the backend server for app functionality this test also makes sure that there is good connectivity and the web server/LC server is functioning in one test.

In one of my apps the user can save notes about each location retrieved from a static local DB. These notes a saved in a second local DB and also uploaded to the server for backup. So... I need to keep "last update" dates on both the device and the server and resolve this with every transaction and also on app startup just in case the user lost connectivity and saved a note locally to the device. I try to deal with all combination but I'm sure there some obscure race conditions that I am not handling, but it's not moving money, air traffic control or launching the space shuttle.

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
Sent: Saturday, September 02, 2017 12:22 AM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: TSNet error 6


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 


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?



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.

use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list