[zeromq-dev] [zmqpp] receiving can only be done to empty messages?
Lindley French
lindleyf at gmail.com
Tue Jan 7 18:06:06 CET 2014
At the same time I'm going to strongly suggest reviewing the assertion:
assert(EAGAIN == zmq_errno());
in the same function. I'm frequently getting EINTR here and failing the
assertion when I run in gdb. (I think gdb throws a lot more signals than
you'd normally get.)
On Tue, Jan 7, 2014 at 11:35 AM, Ben Gray <ben at benjamg.com> wrote:
> On 7 January 2014 16:24, Lindley French <lindleyf at gmail.com> wrote:
>
>> In zmqpp, the socket_t::receive() method throws an exception if you pass
>> it a non-empty message_t. This seems to be contradictory to the philosophy
>> of zmq_recv(), which states that the message passed to it will be
>> deallocated cleanly if necessary.
>>
>> Now, I know zmqpp defines a "message" as all parts of a multipart
>> message, while libzmq defines it as just one part. So this isn't a direct
>> contradiction of the API semantics. But it seems like this could be fixed
>> without much effort.
>>
>>
>>
> That was originally done to avoid people mistakenly overwriting a message
> they didn't mean to. Although in retrospect was probably a bad choice to
> make.
>
> Your right in that it would be easy to alter and make it act more like the
> single part zmq_recv() function. Technically this would be a breaking
> change although I can't imagine anyone relied upon the prior functionality.
>
> I'm happy to change how this works if the consensus is that it makes more
> sense this way.
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140107/9978e1ac/attachment.htm>
More information about the zeromq-dev
mailing list