[zeromq-dev] Sending empty messages with CZMQ
Pieter Hintjens
ph at imatix.com
Mon Jul 8 20:36:02 CEST 2013
On Mon, Jul 8, 2013 at 5:50 PM, Michaël Melchiore <rohel01 at gmail.com> wrote:
> I have just noticed I can send messages containing a single empty frame but
> empty messages will be silently discarded by CZMQ zmsg_send: in the linked
> source code, both client and server will hang if no frames are added to the
> messages.
>
> Is it intended behavior ? Should zmsg_send at least assert in that case ?
Yes, it should perhaps return an error. There is no meaning for an
empty message except perhaps "send an empty frame" but that would
create an inconsistency when receiving it.
Thanks for catching this. I'll add a test case and fix it.
-Pieter
More information about the zeromq-dev
mailing list