[zeromq-dev] why doesnt zeromq socket.recv support interrupts or timeouts
Martin Sustrik
sustrik at 250bpm.com
Wed Jan 12 14:50:54 CET 2011
Hi Koert,
> For example in java, why doesn’t socket.recv throw InterruptedException?
AFAIK it throws org/zeromq/ZMQException that encapsulates the POSIX
error code returned from the socket. If you want to convert the
exception to its native java counterpart, feel free to send the patch to
the mailing list.
> And why is there no version of socket.recv that has a timeout?
No. If you want a timeout you have to poll on the socket. Poll does have
timout.
Martin
More information about the zeromq-dev
mailing list