[zeromq-dev] Java to C++: junk appended to message?
ph at imatix.com
Mon Aug 30 21:30:49 CEST 2010
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
> 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
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
iMatix - www.imatix.com
More information about the zeromq-dev