[zeromq-dev] jzmq: String -> byte[]

gonzalo diethelm gdiethelm at dcv.cl
Tue Aug 17 23:58:46 CEST 2010

> Hi,

Hi Alexey,

> I've converted the ZMQ API to use byte arrays instead of Strings in
> set/getIdentity, Subscribe, Unsubscribe. You can have a look at
> 4d64ec0ae3>.
> Although my knowledge of C++ is very rusty, so I'd prefer if you
> checked the diff (I've tested the API itself and it seems to work).
> I haven't added any deprecated methods yet, and I'm not sure if they
> will be necessary at all.

I am sorry for the delay, I had problems all day long (on my end)
accessing github. I have pulled your changes and committed them with
some minor modifications (handle an error case).

> I've also got some naming suggestions about the various socket
> methods. In my opinion, this would look nicer:
>   setSubscribe(topic)/setUnsubscribe(topic) ->
> subscribe(topic)/unsubscribe(topic)
>   getReceiveMore() ->
> hasReceiveMore()/isReceiveMore()/canReceiveMore() [not sure which one,
> I'd say canReceiveMore looks nicer, although I'm not sure if it
> describes the semantics properly].
> Not sure how to call getMulticastLoop() - maybe something like
> "setMulticastLoopEnabled()/isMulticastLoopEnabled"?

That makes sense, I have made the following changes (taking advantage of
the fact that no one has ever complained about API changes in the Java

getMulticastLoop() => hasMulticastLoop()
getReceiveMore() => hasReceiveMore()
setSubscribe(byte[] subscribe) => subscribe(byte[] topic)
setUnsubscribe(byte[] unsubscribe) => unsubscribe(byte[] topic)

Thanks for your help and best regards.

Gonzalo Diethelm

More information about the zeromq-dev mailing list