tsNet Error Codes (was: Internet checking?)

2018-03-03 Thread Graham Samuel via use-livecode
Charles Warwick of Tech Sstrategies gave me this info and doesn’t mind if it’s shared. May be useful to some folk on the list! It certainly solved my question about tserror(7). Graham > The numeric error codes that tsNet reports back come from the curl library > which it uses for all network

RE: Internet checking?

2018-03-02 Thread Ralph DiMola via use-livecode
Ralph DiMola IT Director Evergreen Information Services rdim...@evergreeninfo.net -Original Message- From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of Bob Sneidar via use-livecode Sent: Friday, March 02, 2018 3:02 PM To: How to use LiveCode Cc: Bob Sneidar Su

Re: Internet checking?

2018-03-02 Thread Bob Sneidar via use-livecode
Yes, trying to figure out WHY the connection failed is trickier. I think you are right that Safari pings an IP (to exclude DNS problems) and then looks at the response. A ping that has no route will report something like Destination Unreachable as opposed to timeout. On my Apple terminal, if I

Re: Internet checking?

2018-03-02 Thread Graham Samuel via use-livecode
Bob of course you’re right - in my particular case, anyway, I just want to know if I can access me chosen server or not. But one could certainly imagine programs that would want to know if they were wasting their time offering their users a broader internet access - I mean any program that

Re: Internet checking?

2018-03-02 Thread Bob Sneidar via use-livecode
Hi Graham. Whether or not you are connected to the internet isn't really the issue, is it? All that means is that you have a route to the WAN port of your edge router. I mean, the real issue is finding out if you can reach a particular server on a particular port using DNS, or else a given IP

Re: Internet checking?

2018-03-02 Thread Graham Samuel via use-livecode
Rick, thanks for the reply. Well, sounds good, but as I have no idea of the range of happenings that could generate that error, I need a bit more information first! It’s odd how hard it is to find this stuff out. If it wasn’t for the nice little ‘LiveCode Error Lookup’ plug-in that’s been

Re: Internet checking?

2018-03-02 Thread Rick Harrison via use-livecode
Hi Graham, Why don’t you just check for the existence of "tsneterr: (7)”? Rick > On Mar 2, 2018, at 7:18 AM, Graham Samuel via use-livecode > wrote: > > 2. If I switch off my internet connection, I get the result “tsneterr: (7)”

Re: Internet checking?

2018-03-02 Thread Graham Samuel via use-livecode
I wrote: > > Maybe I will write a tiny standalone that just talks to my server, and > experiment with switching off the internet connection to see what errors I > get. I just did that, but so far have only used it in the IDE. I found out two things: 1. Despite my not being particularly

Re: Internet checking?

2018-03-02 Thread Graham Samuel via use-livecode
Jacque, thanks. It seems like overkill to load up and initialise tsnet just to get a 20-byte text file. I’m really surprised there isn’t a foolproof way to find out if one’s device is connected to the internet or not. I am not good on internet functions, but don’t a huge number of apps in the

Re: Internet checking?

2018-02-28 Thread J. Landman Gay via use-livecode
On 2/28/18 5:20 PM, Graham Samuel via use-livecode wrote: I know this is a golden oldie, but I can’t find a reference… I have a script that wants to check a file on a server, and basically to do nothing if the program is offline. Remind me, is there an easy way to tell from within an LC

Re: Internet checking?

2018-02-28 Thread Bob Sneidar via use-livecode
Here is a script I use. A lot of this stuff won't make sense because it is part of my interface with sqlYoga, but the core is a repeat loop where I open a socket to the server, then check if the socket is among the lines of the openSockets. If it is I exit the repeat loop and close the socket,

Internet checking?

2018-02-28 Thread Graham Samuel via use-livecode
I know this is a golden oldie, but I can’t find a reference… I have a script that wants to check a file on a server, and basically to do nothing if the program is offline. Remind me, is there an easy way to tell from within an LC standalone if the internet is not accessible? I don’t want my