Never mind with the documentation, I am using the C++ class, which returns true/false.
Note to self: "Never write questions after official bedtime" Varol :) Varol Okan wrote: > I was trying to get zmq_poll working but for some reason my app crashes > event when I init the ctx with the ZMQ_POLL flag. > > It'll crash inside zmq_poll at : > pollfds [npollfds].fd = app_thread->get_signaler ()->get_fd (); > for some reasons app_thread->get_signaler () is NULL. > > > Anyhow, I just thought I drop a line wrt the zmq_recv documentation. > > Looking at the *ZMQ_NOBLOCK *section it states > Specifies that the operation should be performed in non-blocking mode. > If there are no messages available to be dequeued from the underlying > /message queue/ associated with /socket/, the /zmq_recv()/ function > shall fail with /errno/ set to EAGAIN. > > > So I was expecting the function to return -1, as stated a few lines > further down > * > RETURN VALUE* > The /zmq_recv()/ function shall return zero if successful. Otherwise it > shall return -1 and set /errno/ to one of the values defined below. > > However if no msg is available it'll return 0, else 1. ( on Linux ) > > Smehow there seems to be a disconnect between those two. > > Varol :) > > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
