Internet connection test

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Internet connection test

Post by kotikoti » Mon Dec 08, 2008 12:32 pm

Hi,
Need to check (continously) the internet connection status within the application at an interval of say 30 seconds..
Using the load URL "url name" setup at the beginning of the application in the preopenstack.

Within openstack, I have the function that will loop at the set interval that picks the data from the cache created by the load URL above.

What am not able to accomplish is to drop the cache so that on next check, a fresh load is done...

Have unload URL "url name" within the above function after I do a read, and what I assume to be a fresh load URL after that....

Testing this by disconnecting from the internet, but the application still assumes I am connected, doesn't the unload URL clear the cache?


also, tried the ping route, and can't get that to work...
assumed I could ping www.bbc.co.uk, that times-out
Build 160
Version 2.9.0
Platform: Windows

AndyP
Posts: 634
Joined: Wed Aug 27, 2008 12:57 pm
Contact:

Post by AndyP » Mon Dec 08, 2008 2:20 pm

Hi Kotikoti,

You could try this:

set the httpHeaders to "Cache-control : no-cache"
Andy .... LC CLASSIC ROCKS!

kotikoti
Posts: 72
Joined: Tue Apr 15, 2008 7:35 pm

Post by kotikoti » Mon Dec 08, 2008 2:28 pm

will try and update...
Thanks
Build 160
Version 2.9.0
Platform: Windows

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Post by SparkOut » Mon Dec 08, 2008 3:23 pm

There are a few alternative methods to try out on http://www.altuit.com/webs/altuit2/RunR ... cripts.htm as well, if you're still stuck.

Simon
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3901
Joined: Sat Mar 24, 2007 2:54 am

Post by Simon » Sun Jan 11, 2009 2:48 am

Hi kotikoti,
I was just having the same problem:

Code: Select all

unload URL "http://www.mysite.com"
Was not working, the files continued to download even after the command was sent.
My workaround was to add a wait:

Code: Select all

unload URL "http://www.mysite.com"
wait 1 tick with messages
That cleared it up.

Simon

Post Reply