[zeromq-dev] Inproc and zero-copy question

Pieter Hintjens ph at imatix.com
Wed Feb 5 21:38:00 CET 2014

On Wed, Feb 5, 2014 at 9:32 PM, Lindley French <lindleyf at gmail.com> wrote:

> 1) Messages will not be moved around with C-style memcpy, etc. I don't know
> how weak_ptr (or shared_ptr) would react to this, but it's a bad idea in
> general. It can break vtables and stuff like that. I recall reading that
> inproc doesn't do any copying, but is this an API guarantee or just an
> implementation detail?

Inproc certainly may copy message contents on sending. It depends on
the API call you use, and I don't think there's a zero-copy receive
call at all.

> 2) Messages will not be dropped silently. I think PAIR and PUSH/PULL meet
> this requirement. Please confirm----there is NO WAY for these types to drop
> messages, correct?

This is correct, over inproc. Over TCP messages may be lost when
underlying connections are broken unexpectedly.


More information about the zeromq-dev mailing list