libUrl tsNet and socketTimeoutInterval

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Wed Dec 6 11:15:55 EST 2017


The connection ID is only used/needed when you use the asynchronous commands of tsNet.

The synchronous commands like tsNetUploadSync or tsNetFileUploadSync or others (they are ending with Sync) do not use connectionIDs. And i assume that put URL and get URL are using the synchronous commands.

Matthias

> Am 06.12.2017 um 17:08 schrieb Sannyasin Brahmanathaswami via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>>:
> 
> 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 <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?
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com <mailto: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