[zeromq-dev] Receive messages in erlzmq

Ian Barber ian.barber at gmail.com
Wed Feb 23 07:51:55 CET 2011


On Wed, Feb 23, 2011 at 6:43 AM, Garrett Smith <g at rre.tt> wrote:

> 2. How would one handle multipart messages? It's not clear to me how
> I'd differentiate between a message part and a single part message or
> last-part.
>
> Garrett
>

I suspect Erlang will be broadly the same as the other bindings, in that you
will check getSockOpt (or some similar function) for a RECV_MORE flag - if
this is set there is more than one part to the message, which you can grab
by calling recv() again. In general you usually end up wrapping a loop of
recv, check flag in a small function or library class, in the manner of
zhelpers.h in the guide.

Ian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110223/2080ae8a/attachment.htm>


More information about the zeromq-dev mailing list