Re: [zeromq-dev] question about integrating zmq socket fd in external select() loop

2012-08-06 Thread diffuser78
Can someone plz share their experiences around this problem ? On Fri, Aug 3, 2012 at 3:38 PM, diffuser78 diffuse...@gmail.com wrote: Hi, I am writing a lib that uses zmq. This lib is going to be used in an app that already has an external select() loop. Can I use fd's retrieved from ZMQ_FD

Re: [zeromq-dev] question about integrating zmq socket fd in external select() loop

2012-08-06 Thread Chuck Remes
Answers are inline. On Aug 6, 2012, at 11:18 AM, diffuser78 wrote: Can someone plz share their experiences around this problem ? On Fri, Aug 3, 2012 at 3:38 PM, diffuser78 diffuse...@gmail.com wrote: Hi, I am writing a lib that uses zmq. This lib is going to be used in an app that

Re: [zeromq-dev] question about integrating zmq socket fd in external select() loop

2012-08-06 Thread Justin Karneges
Stuff I ran into when implementing: 1) Be aware that ZMQ_FD only generates read events. You then check ZMQ_EVENTS to see what actually happened. 2) You need to check ZMQ_EVENTS in three situations: after ZMQ_FD read event, after calling zmq_send, and after calling zmq_recv. It was only

[zeromq-dev] question about integrating zmq socket fd in external select() loop

2012-08-03 Thread diffuser78
Hi, I am writing a lib that uses zmq. This lib is going to be used in an app that already has an external select() loop. Can I use fd's retrieved from ZMQ_FD from zmq_getsockopt() in that select loop successfully ? Are there examples already that tell you how to do it ? Are there any things that