polling only on socket, or can there be a trigger?
Dr. Hawkins
dochawk at gmail.com
Sat May 9 20:13:06 EDT 2015
On Sat, May 9, 2015 at 12:03 PM, Mark Waddingham <mark at livecode.com> wrote:
> The reason I wrote the outline as a 'ping-pong' of reads and writes is
> because that is what most protocols entail, but you could schedule a
> sequence of 'read with message' and/or a sequence of 'write with message'
> and they would be serviced in order for each read queue and write queue
> (the actual nature of the interleaving of the two would depend on when data
> finishes sending, or is received).
>
So where I really should be going then, is
on newClient clAdr
doSomeStuff
read from socket clAdr with message "dhbkProcScktDat"
end newClient
on dhbkProcScktDat skt, msg
doSomethingWith Data
read from socket sckt with message "dhbkProcScktDat"
end dhbkProcScktDat
So that when it processes data, it puts itself back in place to do it again.
Or should it be more like
on dhbkProcScktDat skt, msg
doSomethingWith Data
send readAgain socket to me in 0
end dhbkProcScktDat
on readAgain sckt
read from socket sckt with message "dhbkProcScktDat"
end readAgain
so that dbkProcScktDat actually exists instead of nesting umpteen layers?
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list