i have a situation where i sometimes store messages for a while before sending
on.
is this code safe (in terms of message handling)?
zmq_msg_t msg, buf[2000];
zmq_msg_init(&msg);
zmq_recv(sock, &msg, 0);
if(cond)
buf[i++] = msg;
else
zmq_msg_close(&msg);
...
for(j = 0; j < i; j++){
zmq_send(osock, &buf[j], 0);
zmq_msg_close(&buf[j]);
}
initial evidence indicates stuff is happening behind my back but before i spend
a lot of time debugging that, i wanted to ensure that this is even possible.
thanks
------------------
Andrew Hume (best -> Telework) +1 623-551-2845
[email protected] (Work) +1 973-236-2014
AT&T Labs - Research; member of USENIX and LOPSA
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev