[zeromq-dev] Other poll events than in/out

Brian Granger ellisonbg at gmail.com
Mon Feb 15 18:33:37 CET 2010


Martin,

>> * 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.

I am going to focus on the Python bindings for now.  I want to get
that in shape and
then have a student start to see how exactly we can use 0MQ for our usage case.
For now, I don't think it is critical for us to be able to use native
sockets in our
app.  I just want to make sure I design the Python interface so that eventually
ZMQ_POLLERR can be handled.

>> * 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.

Great.

>> * 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.

OK thanks,

Cheers,

Brian

> Martin
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com



More information about the zeromq-dev mailing list