ZMQ poll not working

吃可爱长大的小学妹 提交于 2019-11-29 14:11:53

To obtain a ØMQ socket for use in a zmq_pollitem_t structure, you should cast an instance of the socket_t class to (void *).

So it should be

zmq::pollitem_t items[] =
{
    { repA, 0, ZMQ_POLLIN, 0 },
    { repB, 0, ZMQ_POLLIN, 0 }
};

Without the &.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!