resetall?
Mark Waddingham
mark at livecode.com
Mon Feb 21 11:57:48 EST 2022
On 2022-02-21 16:51, Mark Wieder via use-livecode wrote:
> Before I report this one...
>
> I thought resetall was supposed to close open sockets. There's even a
> warning in the docs about it being a brute force close. But it doesn't
> seem to do anything useful. Am I missing something?
Its a synonym for libUrlResetAll - and was only really intended to reset
libUrl state I think (so its not clear to me why it didn't only ever
touch the sockets libUrl was using).
These days if tsNet is loaded then it will just reset tsNet's state:
on libUrlResetAll
local i
-- CW-2016-06-11: [[ External driver support ]] Call driver specific
reset command if external driver is in use.
if lvExtDriver is not empty then
ulDeleteLocals
ulExtResetDriver
else
if there is a stack "libUrl" then put empty into fld "log1" of stack
"libURL"
repeat for each line i in the openSockets
close socket i
end repeat
ulDeleteLocals
put true into lvJumpOut
send "ulDeleteLocals" to me in 5 milliseconds
end if
end libUrlResetAll
If you want to brute force close all sockets then I suggest:
repeat for each line i in the openSockets
close socket i
end repeat
:)
Warmest Regards,
Mark.
--
Mark Waddingham ~ mark at livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps
More information about the use-livecode
mailing list