17.08.12, 0:51, Claudio Carbone wrote:
> Zerrno = zmq_poll(...);
> If(zerrno != 0)
> Printf("%s",zmq-strerror(zerrno);
zmq_poll returns -1 if error has happened, 0 if no events were triggered
during waiting in zmq_poll, and some integer value N (where N is > 0) to
indicate number of zmq_pollitem_t items where some event has happened.
You register only one pollitem, so possible return values are -1, 0, 1.
If you want to check for error, you must compare return code with -1.
Something like that:
int const res = zmq_poll(...);
if (-1 == res)
printf("%s", zmq_strerror(errno));
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev