[zeromq-dev] Use unused 'fd' field in zmq_pollitem_t to store additional data

Juan López Rubio j.lopez.r at gmail.com
Mon May 13 18:05:10 CEST 2013


I have seen in the documentation that the fd field in zmq_pollitem_t should be ignored if a ZMQ socket is also present in the structure. I have thought of using this field to store additional information for the socket. 

I poll many sockets that all of them use the same function to be processed but the arguments differ, so I use the fd as a pointer to an structure where I store this arguments.

Is there any other option to do this polling scheme?

Best regards,


More information about the zeromq-dev mailing list