[zeromq-dev] Is there any to poll 0MQ and tcp sock together?

Min miniway at gmail.com
Fri Jun 17 20:35:39 CEST 2011


Hello,

I'm building a 0MQ worker which receive  messages from zmq_aocket and
deliver them to an application server(not made by 0MQ) through tcp scoket
(connection established during the worker's life cycle).

The problem is the application server sends notifications through the
established socket and the worker cannot estimate when the notifications
will come.

What I'm doing is

zmq_poll ( zmq_socket, 1 sec )
deliver message if any
poll ( tcp_socket, 1 sec )
handle notification if any

As you can see, it wastes time, it's delivery or handling might have to wait
1 sec even if data is ready.

So, is there any way something like a super poll can get event from both
zmq_socket and tcp_socket ?

Thanks
Min
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110618/f991f182/attachment.htm>


More information about the zeromq-dev mailing list