Check connection and timeout

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


Bob,

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 evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] 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 lists.runrev.com> wrote:

Sorry,

It was mine...

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

Ralph DiMola
IT Director
Evergreen Information Services
rdimola at evergreeninfo.net<mailto: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