Hi,
I wonder if anyone could help me with this?
I have a socket connection which accepts tuples in string form. I want
to be able to access each tuple in turn, suspending execution when
waiting for further input on the socket. The tuples might arrive singly
or in multiples and because they may be of variable size (in terms of
their string representation), I can't use fixed length reading of the
socket.
What I have done so far is to create a thread which continually copies
data read from the socket, converting it to actual tuples and then
adding it to the end of a queue implemented on top of a cell - basically
a buffer. I have a couple of simple push/pop functions to manage the queue.
The problem I am stuck with now is how to make execution suspend if the
content of the cell is nil (and how to resume when more data is added to
the cell).
I'd be very grateful if anyone can offer any advice on this, either how
to implement it the way I've suggested or a better way to achieve the
same result.
Thanks in advance
Mark
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users