[zeromq-dev] Correct way to use zmq_poll?

Martin Sustrik sustrik at 250bpm.com
Tue Feb 23 18:54:24 CET 2010

Hi Carlos,

> I am unsure if I am using zmq_poll correctly. Attached are a
> client/server where the client gives me a segmentation fault after
> passing a couple of message. I may be using poll incorrectly. Comments
> welcome. Thanks!

The program shouldn't definitely cause a segmentation fault. I'll have a 
look at it.

However, I am not sure what you are trying to do. If you want to send a 
request and receive reply, do it this way:

zmq::message_t request;
... fill it in...
s.send (request);
zmq::message_t reply;
s.recv (&reply);
... process the reply ...


More information about the zeromq-dev mailing list