[zeromq-dev] zmq_msg_init() documentation for version 4.2 calling wrong recv function
Luca Boccassi
luca.boccassi at gmail.com
Wed Nov 8 14:50:50 CET 2017
On Tue, 2017-11-07 at 11:05 -0500, Bob Eby wrote:
> 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
Yes indeed, it's outdated since the 2.x days. Could you please send a
PR to fix it?
It's this txt file that generates it:
https://github.com/zeromq/libzmq/blob/master/doc/zmq_msg_init.txt
--
Kind regards,
Luca Boccassi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20171108/18bb7859/attachment.sig>
More information about the zeromq-dev
mailing list