[zeromq-dev] Issue with 2.0.10 java binding -- poll
gonzalo diethelm
gdiethelm at dcv.cl
Thu Oct 21 14:01:53 CEST 2010
Hi Scott,
First, sorry for taking so long to answer, it's been hectic here.
> In the new Java binding release to work with 2.0.10, the Poller class
> was changed substantially. In particular, the register() function had
> the ability to specify which events to register for removed, and in
> its place is the following code:
>
> public int register (Socket socket) {
> return register (socket, POLLIN | POLLOUT | POLLERR);
> }
>
> The problem is that for bidirectional sockets (pair), I now cannot use
> the timeout functionality of poll() as it will almost always return
> immediately because the socket will be available for outbound traffic.
>
> The old design was fine -- why the change?
I am not sure I follow you. There are two register methods:
public int register (Socket socket);
public int register (Socket socket, int events);
Isn't the second one the one you need?
--
Gonzalo Diethelm
More information about the zeromq-dev
mailing list