Problem: zsock_waiting code is too complex

Solution: just test zsock_event()

In fact these two methods could probably be removed without harm.