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

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
zeromq-dev mailing list
[email protected]
https://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to