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 (dm rd1> (Sock) (when (assoc Sock (: socks)) (rot (: socks) (index @ (: socks))) (ext (: ext) (or (in Sock (rd)) (nil (close Sock) (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 (ext (: ext) (in Sock (rd))) followed by 'close' if the remote side closed the connection. > Simply doing: > > (dm rd1> (Sock) > (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=unsubscribe