Hello SM,

 

I have been away for a while, first on a trip and then sick at home.
Your comments make a lot of sense, I hope to have some time tomorrow to
follow up.

 

Thanks for pointing these things out. Best regards.

 

 

Gonzalo Diethelm 

 

________________________________

From: [email protected]
[mailto:[email protected]] On Behalf Of SM
Sent: Monday, 22 November, 2010 19:17
To: [email protected]
Subject: [zeromq-dev] Regarding java binding of 0MQ.

 

Hi,

 

I am trying to use java binding of 0MQ. Following are my
questions/concerns regarding it (Note that before writing this I tried
to search mail archive for relevant discussions to insure I am not
repeating anything which is previously, but might have missed
something):

1. Why Socket/Poller/Context classes are the static inner classes? why
not make them independent classes?

2. When I tried to use Poller.poll() method, it was not doing blocking
call (which I thought would be default behavior) and was returning
immediately, after lot of digging (from Poller.cpp to zmq_poll
documentation) I found out that before calling Poller.poll() one should
set Poller.setTimeout() to -1 to wait indefinitely. This should have
been part of the javadoc of poll() method.

3. Instead of having only one Poller.poll() method why not have two
methods: 1. Poller.poll() with default behavior (to wait indefinitely),
and 2. Poller.poll(timeout) which waits for given time period. Much like
Object.wait() and Object.wait(timeout).

4. Poller.POLLIN/POLLOUT/POLLERR are private static final. How one can
use them in Poller.register (Socket socket, int events)?

 

---

SM


_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to