Ah I see, so the issue is on the remote side then, what did your code
look like there, did you use (prove)?

On Mon, May 10, 2010 at 7:22 AM, Alexander Burger <a...@software-lab.de> wro=
> Hi Henrik,
>> One final question, how did you define the rd1> mechanism?
> In the mentioned case, I used the followin method in the +Agent class
> =A0 (dm rd1> (Sock)
> =A0 =A0 =A0(when (assoc Sock (: socks))
> =A0 =A0 =A0 =A0 (rot (: socks) (index @ (: socks)))
> =A0 =A0 =A0 =A0 (ext (: ext)
> =A0 =A0 =A0 =A0 =A0 =A0(or
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 (in Sock (rd))
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 (nil
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(close Sock)
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(pop (:: socks)) ) ) ) ) )
> This looks a little complicated, as each agent maintains a list of open
> sockets (in 'socks'). But if you omit the 'socks' management, it is
> basically just
> =A0 (ext (: ext) (in Sock (rd)))
> followed by 'close' if the remote side closed the connection.
>> Simply doing:
>> (dm rd1> (Sock)
>> =A0 =A0(in Sock (rd)))
>> will read the whole result, not just the first result, won't it?
> This should not be the case. It depends on what the other side sends. If
> it sends a list, you'll get the whole list. In the examples we
> discussed, however, the query results were sent one by one.
>> I'm a little bit confused since it says in the reference that rd will
>> "read the first item from the current input channel" but when I look
> Yes, analog to 'read', 'line', 'char' etc.
>> Maybe something is needed on the remote? At the moment there is simply
>> a collect and sort by there.
> Could it be that remote sends the result of 'collect'? This would be the
> whole list then.
> Cheers,
> - Alex
> --
> UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=3dunsubscribe
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to