The 4.2 documentation for zmq_msg_init() has this code sample at the bottom:

   zmq_msg_t msg;
   rc = zmq_msg_init (&msg);
   assert (rc == 0);
   int nbytes = zmq_recv (socket, &msg, 0); assert (nbytes != -1);

However, looking in my headers I only see the following zmq receive
functions:

   include\zmq.h:ZMQ_EXPORT int zmq_msg_recv (zmq_msg_t *msg, void *s, int
flags);
   include\zmq.h:ZMQ_EXPORT int zmq_recv (void *s, void *buf, size_t len,
int flags);
   include\zmq.h:ZMQ_EXPORT int zmq_recvmsg (void *s, zmq_msg_t *msg, int
flags);
   include\zmq.h:ZMQ_EXPORT int zmq_recviov (void *s, struct iovec *iov,
size_t *count, int flags);

zmq_recv() takes 4 parameters not 3, perhaps the example should call
zmq_msg_recv() instead?

Thanks,
Robert
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to