[zeromq-dev] Java binding

Martin Sustrik sustrik at 250bpm.com
Mon Feb 22 14:32:40 CET 2010

Hi Gonzalo,

> What I did is add Context::getContextHandle() and
> Socket::getSocketHandle(), which to me is more orthogonal and future
> proof. I also cleaned up the code a little bit and added all kinds of
> comments. I am attaching the files to this message.

I am not sure about the interface - the type you use for handles in Java 
is 'long' which gets translated in C to void*, right?

env->SetLongField (obj, socket_handle_fid, (jlong) s);

Is there any guarantee that Java 'long' type can hold a pointer? I am 
not an expert on Java but storing pointer in a signed integer just 
doesn't sound right.

As for the poll stuff, that's a question for a Java person, not for 
myself. Hopefully, someone will be able to answer.


More information about the zeromq-dev mailing list