[zeromq-dev] Other poll events than in/out
sustrik at 250bpm.com
Mon Feb 15 10:15:18 CET 2010
> * For zmq sockets only io/out events make sense. But what about for
> other socket types. Can zmq_poll be used to monitor other sockets for
> the other events that select/poll know about?
Yes. Native sockets support error event in addition to in & out. This
should be added. There's already a ticket for this (ZMQII-71) so it's on
my todo list. However, adding ZMQ_POLLERR to the header files, passing
it to the underlying poll/select function (zmq.cpp) and retrieving the
result should be pretty easy in case you want to have to fix it ASAP.
> * When working with zmq sockets, does zmq_poll know about when
> complete messages are ready to be sent or received, or when the
> underlying socket is ready for read/write?
It's concerned with complete messages.
> * In the IO thread, does zmq call the real poll/select and manage the
> tcp/tpc/etc sockets in a non-blocking manner?
The poll is called in application thread. It polls on raw sockets
supplied to zmq_poll and for a single socket delivering notifications
from I/O threads.
More information about the zeromq-dev