[zeromq-dev] Perl: zmq_poll

Pedro Melo melo at simplicidade.org
Fri Dec 28 17:57:28 CET 2012


On Fri, Dec 28, 2012 at 4:54 PM, Thomas Klausner <domm at plix.at> wrote:
> On Fri, Dec 28, 2012 at 10:49:30AM -0500, Nishant Mittal wrote:
>> I checked the example code for multiple socket poller (
>> http://zguide.zeromq.org/pl:mspoller) but its not clear to me as to how I
>> can get a handle to the socket that fired the callback function. The
>> example just prints a warning message and does not attempt to get the
>> message.
> AFAIK it's not a good idea to use the 0mq poller in Perl. I've had
> better success using AnyEvent. I wrote up my first experiences here:
> http://domm.plix.at/perl/2012_12_getting_started_with_zeromq_anyevent.html

If you are only using zmq sockets, zmq_pool is fine. If you plan to
add other fd's, I would also strongly recommend AnyEvent to manage it

The ZMQ::LibZMQ2 (and LibZMQ3) docs have an example of how to integrate the two.

Pedro Melo
xmpp:melo at simplicidade.org
mailto:melo at simplicidade.org

More information about the zeromq-dev mailing list