libUrl tsNet and socketTimeoutInterval

Sannyasin Brahmanathaswami brahma at hindu.org
Wed Dec 6 11:08:20 EST 2017


Still searching… let's break this down a bit

Almost TSNet functions and commands require a connectionID. In some instances these are aribitrary strings assigned by the dev on the initial call, then used later.

but what if we use the simple libURL commands?

get url "https://www.domain.com/ping.txt"

OR

 set a  mobile player to a URL and start the player

OR

use "load"

how do we extract a connectionID?

use case is to check the socketTimeout pSocketID (which may not be the same as a "connectionID" .

I am still searching the dictionary for clues on how it all works. Not clear on using plain libURL commands with TSNet… 
Or if best practice is to switch over entirely to TSnet "vocabulary"  for all URL calls. will check for lessons on this later..

Goal is preloading images or pages in books (aka "load") and monitoring bandwidth and triggering notifications in low bandwidth conditions.

BR


    
    FYI the dictionary does not declare units for the pLowSpeedTime, it should… I've assumed integers = seconds and not milliseconds for param 5.
    
    Second  (dumb) question: how do we trap for the timeout? we keep checking the tsNetStatusCallback on a loop? and if and when we see timeout we inform the user? But we need a connectionID, so how do we extract a connectionID from put/get/set/ http urls? where we are targeting  browser widget on a card. Or a mobilePlayer?



More information about the use-livecode mailing list