BR,

> OK, now going over to the forum on this dropbox thread I see Jacque's and 
> Charle's comments. 5 secs seems a little long.. so if we use the algorithm 
> "We want to tell users what is up or dim content options from remote servers 
> in 3 seconds"  (and FTP is not in the cards) we get: 
> 
> tsNetSetTimeouts 60, 3000, 3000 , , 3, 12000
> 
> This translates "you must have a 96kbps connection or else…"  right?
> 
> FYI the dictionary does not declare units for the pLowSpeedTime, it should… 
> I've assumed integers = seconds and not milliseconds for param 5.


I will get that fixed in the dictionary in the next version, thanks for letting 
me know.

tsNetSetTimeouts uses the last two parameters to determine if a connection 
should be dropped if the “average” speed of the transfer falls below the values 
set.

To use your example, if you want to ensure that the average speed of the 
transfer does not fall below 96kbps, calculating the average speed over a 3 
second period, you would specify a value of 3 for the second last parameter and 
96000 (96kbps x 1000 bytes per kB) for the last parameter to tsNetSetTimeouts.


> 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?


If you are using a standard synchronous libUrl request (put URL, post x to URL, 
etc...) then the request will abort as soon as the connection speed falls below 
the threshold specified and an error will be stored in the result.

For asynchronous tsNet requests, the callback message will be sent with an 
error code indicating the failure.

Hope that helps,

Cheers.

Charles



_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
  • Apps or via browser using HTML... Pyyhtiä Christer via use-livecode
    • Re: Apps or via browser u... Mike Kerner via use-livecode
      • libUrl tsNet and sock... Ralph DiMola via use-livecode
        • Re: libUrl tsNet ... Charles Warwick via use-livecode
          • Re: libUrl ts... Sannyasin Brahmanathaswami via use-livecode
            • Re: libU... Sannyasin Brahmanathaswami via use-livecode
              • Re: ... Sannyasin Brahmanathaswami via use-livecode
                • ... Matthias Rebbe via use-livecode
                • ... Sannyasin Brahmanathaswami via use-livecode
                • ... Charles Warwick via use-livecode
              • Re: ... Charles Warwick via use-livecode
                • ... Charles Warwick via use-livecode
                • ... Sannyasin Brahmanathaswami via use-livecode
                • ... Charles Warwick via use-livecode
                • ... Ralph DiMola via use-livecode
                • ... Charles Warwick via use-livecode
                • ... Ralph DiMola via use-livecode
                • ... Sannyasin Brahmanathaswami via use-livecode
                • ... Ralph DiMola via use-livecode
                • ... Sannyasin Brahmanathaswami via use-livecode
                • ... Sannyasin Brahmanathaswami via use-livecode

Reply via email to