libUrl tsNet and socketTimeoutInterval
Charles Warwick
charles at techstrategies.com.au
Wed Nov 22 23:16:39 EST 2017
Hi Ralph,
You are correct, as tsNet does not use the standard LiveCode sockets, it does not pay attention to the socketTimeoutInterval.
However, rather than disabling tsNet, you can resolve any app hangs related to socket timeouts by using the tsNetSetTimeouts command which allows you to control how long the external will wait before considering a connection lost.
Have a look at the following bug report which is about a similar issue:
http://quality.livecode.com/show_bug.cgi?id=20627
Effectively the last two parameters to that command allow you to set a minimum amount of data that must be transferred across a connection within a specified period of time to consider a connection still active.
Having said that, when tsNet is disabled, libUrl should continue to pay attention to the socketTimeoutInterval property.
I have just done quick test on LC8.2.0dp2 and if I set the socketTimeoutInterval before making a “put URL xxx” call to a script that deliberately doesn’t respond in time, the request times out after the time specified by the socketTimeoutInterval call and returns a result of “socket timeout”.
Regards,
Charles
> On 23 Nov 2017, at 6:27 am, Ralph DiMola via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> libURL now using tsNet is a great addition to v8 but it seems to have broken my code without warning unless I missed this warning in the release notes. I seems that when tsNet was included in v8 the property socketTimeoutInterval does nothing when doing ==> put url("https://"&pURL&":"&pPort) into tWebData <==. This explains a few reported app hangs. In the IDE tried ==> dispatch "revUnloadLibrary" to stack "tsNetLibURL" <== but socketTimeoutInterval still does nothing. Ran the stack in 7.1.4 and socketTimeoutInterval works as expected. It's my understanding that when tsNet is unloaded libUrl falls back to using sockets and the socketTimeoutInterval property should be respected.
>
> I'm using 8.1.7
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
>
>
> _______________________________________________
> use-livecode mailing list
> 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