@Override
    protected boolean xhas_in () {
        //  There are subsequent parts of the partly-read message available.
        if (more)
            return true;

        //  If there's already a message prepared by a previous call to zmq_poll,
        //  return straight ahead.
        if (has_message)
            return true;

        //  TODO: This can result in infinite loop in the case of continuous
        //  stream of non-matching messages.
        while (true) {

            //  Get a message using fair queueing algorithm.
            message = fq.recv ();

            //  If there's no message available, return immediately.
            //  The same when error occurs.
            if (message == null) {
                assert(ZError.is(ZError.EAGAIN));
                return false;
            }

            //  Check whether the message matches at least one subscription.
            if (!options.filter || match (message)) {
                has_message = true;
                return true;
            }

            //  Message doesn't match. Pop any remaining parts of the message
            //  from the pipe.
            while (message.has_more()) {
                message = fq.recv ();
                assert (message != null);
            }
        }

    }