[zeromq-dev] Java to C++: junk appended to message?

Naveen Chawla naveen.chwl at gmail.com
Mon Aug 30 21:41:40 CEST 2010

As a user I don't want anything added on either side. My final app
won't use strings (I was only doing "Hello World" testing to get
familiar with 0mq). I like 0mq to be simple. I'll be sending "real
data" in my final app. Even a "send string" utility method in Java
that takes a String instead of byte[] would teach the user less and
not more. This is easily solved in a cross-language "Hello World"
tutorial. Untouched data is awesome. And you guys are ABSOLUTELY

On 30 August 2010 20:30, Pieter Hintjens <ph at imatix.com> wrote:
> On Mon, Aug 30, 2010 at 9:22 PM, Wolfgang Richter <wolf at cs.cmu.edu> wrote:
>> printf and its family of functions all support this, no need for a
>> NUL-terminator if you don't have one.
>> Also, say you want to do strcmp(), just use strncmp() with max length
>> etc.
>> Is there a compelling use-case to add this into 0MQ?
> No, it was just an idea to ease interop between C and other languages
> and avoid the frequent errors people will hit when trying to exchange
> strings.
> The other solution is documentation, i.e. very clearly explaining
> somewhere that C has a different string format from other languages
> and that strings sent from language A to C won't be usable as such
> (without specifying the length in every single function call, or
> copying).
> -
> Pieter Hintjens
> iMatix - www.imatix.com
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list