Check connection and timeout

Ralph DiMola rdimola at
Fri Jul 14 12:04:20 EDT 2023


I use this function to return an array of the timeouts.

function EIStsNetGetTimeouts
   local tTimeouts, tTsNetTimeoutArray
   put tsNetGetTimeouts() into tTimeouts
   put item 1 of tTimeouts into tTsNetTimeoutArray["DnsCacheTimeout"]
   put item 2 of tTimeouts into tTsNetTimeoutArray["RequestTimeoutMS"]
   put item 3 of tTimeouts into tTsNetTimeoutArray["ConnectTimeoutMS"]
   put item 4 of tTimeouts into tTsNetTimeoutArray["AcceptTimeoutMS"]
   put item 5 of tTimeouts into tTsNetTimeoutArray["LowSpeedTime"]
   put item 6 of tTimeouts into tTsNetTimeoutArray["LowSpeedLimit"]
   return tTsNetTimeoutArray
end EIStsNetGetTimeouts

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at

-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at] On Behalf
Of Bob Sneidar via use-livecode
Sent: Friday, July 14, 2023 11:47 AM
To: How to use LiveCode
Cc: Bob Sneidar
Subject: Re: Check connection and timeout

Thanks Ralph, very handy, but is there a way to get the timeout to see if
the command to set the timeout worked? I change networks frequently, and if
I do not disconnect and reconnect to my SQL database, I run the risk of
using a stale connection, and then I face the dreaded 60 second stall before
I can proceed.

Bob S

On Jul 14, 2023, at 8:36 AM, Ralph DiMola via use-livecode
<use-livecode at> wrote:


It was mine...

function GetNetworkType
  local tLibUrlDriver
     put the behavior of stack"revLibUrl" into tLibUrlDriver
  end try
  if tLibUrlDriver is empty then
     return "libURL"
     return "tsNet"
  end if
end GetNetworkType

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at<mailto:rdimola at>

use-livecode mailing list
use-livecode at
Please visit this url to subscribe, unsubscribe and manage your subscription

More information about the use-livecode mailing list