[zeromq-dev] Perl: zmq_poll

Nishant Mittal nmittal at rblt.com
Fri Dec 28 17:51:15 CET 2012


Thanks Pedro, problem is that my sockets are in an array and I am building
the poll items in a loop

my @p;
for (my $i=0; $i<6; $i++) {
   push(@p, {
            socket  => $skt[$i],
            events  => ZMQ_POLLIN,
            callback => sub {
                warn "Process task";
            }
        });
}
zmq_poll(\@p);

now in the call back I have no way of getting the index in the array. I am
trying with passing params to the callback. making some progress but seeing
other issues.

I'll report back.

thanks






On Fri, Dec 28, 2012 at 11:43 AM, Pedro Melo <melo at simplicidade.org> wrote:

> messages




-- 
*Nishant Mittal*
Director, Product Development
*Rosenblatt Securities Inc*.
20 Broad Street
New York, NY 10005

Direct: 212-607-3159
Mobile: 646-504-2629
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121228/fcaf94f4/attachment.htm>


More information about the zeromq-dev mailing list