Check connection and timeout
Bob Sneidar
bobsneidar at iotecdigital.com
Fri Jul 14 11:20:36 EDT 2023
getNetwotkType() is not a valid function.
Bob S
> On Jul 14, 2023, at 8:14 AM, Ralph DiMola via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Ludovic,
>
> Make sure that tsNet is active:
>
> command NetworkType
> if GetNetworkType() = "libURL" then
> answer"tsNet is disabled(LibURL)"
> else
> answer "tsNet in use"&cr&"Version==>"& tsNetVersion()
> end if
> end NetworkType
>
> Did you initialize tsNet? ==> tsNetInit
>
> Disable tsNet ==> dispatch "revunloadlibrary" to stack "tsnetliburl"
> To enable tsNet ==> dispatch "revloadlibrary" to stack "tsnetliburl"
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
>
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On Behalf Of Ludovic THEBAULT via use-livecode
> Sent: Friday, July 14, 2023 3:51 AM
> To: How to use LiveCode
> Cc: Ludovic THEBAULT
> Subject: Re: Check connection and timeout
>
>
>
>> Le 14 juil. 2023 à 08:26, Ludovic THEBAULT via use-livecode <use-livecode at lists.runrev.com> a écrit :
>>
>> Hello,
>>
>> I use this code to check is there is an internet connection :
>>
>> tsNETSETTIMEOUTS 60,0,2000,60000,5,1000
>>
>> put tsNetHeadSync("https://google.com/", tHeaders, tResult, tBytes) into tRecvHeaders
>>
>> if tResult begins with "tsneterr:" then
>> return false
>> else
>> return true
>> end if
>>
>>
>> But the setting for the timeout of tsNETSETTIMEOUTS is not active, I always have a 30 seconds timeout.
>>
>> Is there an other settings ?
>>
>
>
> Addendum : it happen when there is a connection (aka in 4G or Wifi) but no enough network.
>
>
> _______________________________________________
> 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
>
>
> _______________________________________________
> 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