resetall?
Mark Waddingham
mark at livecode.com
Tue Feb 22 03:52:52 EST 2022
On 2022-02-21 20:17, Mark Wieder via use-livecode wrote:
> On 2/21/22 10:37, Mark Waddingham via use-livecode wrote:
>
>> Put another way - if you have done 'close socket i', then it is then
>> it should be logically impossible for i to be in the openSockets
>> immediately afterwards.
>
> Ah. Sorry - after issuing a closeSocket call the socket does *not*
> appear in the opensockets. But the socket seems not to be responding
> until a reboot. And I'm thinking that I may have a blocking read still
> in play at that point, and the close socket command doesn't affect it.
Can you clarify what you mean by the 'socket seems to not be
responding'?
When you 'close socket', the engine immediately cancels all pending
reads, but will not actually close the file descriptor until all pending
writes have finished.
I'm puzzled by the idea of 'blocking writes' - write to socket without
message will block script execution (and messages) until the timeout or
the data is sent; so you can't close socket while that is happening (as
script will not be executing).
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