A message for data waiting at a socket?
Doug Lerner
doug at webcrossing.com
Sat Jan 3 08:41:44 EST 2004
On 1/3/04 2:26 PM, "Dar Scott" <dsc at swcp.com> wrote:
>
> On Friday, January 2, 2004, at 10:00 PM, Doug Lerner wrote:
>
>> Neither one seems to have anything to do with the push of data from the
>> other side, does it? I mean, in both cases you still have to invoke the
>> "read from socket" command again somehow, like I am already doing,
>> wouldn't
>> you?
>
> Do the next read in the message handler unless the socket was closed.
>
> The message handler will then be called each time some data is
> available. For small messages, this is usually at the push.
>
> Dar Scott
>
Hmmm... The following *does* seem to cause some sort of cpu-eating loop that
is hard to get out of:
on readMySocket
.
.
.
if mySocket is among the lines of the openSockets then
read from socket mySocket until CRL with message "readMySocket"
end if
end readMySocket
Is that what you meant?
doug
More information about the use-livecode
mailing list