TSNet error 6

Ralph DiMola rdimola at evergreeninfo.net
Sat Sep 2 14:51:25 EDT 2017


Another Gotch ya... If you connect to a MySql DB (although https to back-end server is preferred) every time you do a query of some sort first do something simple like "SELECT 'I am Here'" or list the tables and see if you get back a number for the record set or a list of tables. If not then close the connection(found this keeps things from going sideways) and then re-connect to the MySql server.

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

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.

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





More information about the use-livecode mailing list