public int zmq_recviov (SocketBase s_, byte[][] a_, int count_, int flags_)
    {
        if (s_ == null || !s_.check_tag ()) {
            throw new IllegalStateException();
        }

        int nread = 0;
        boolean recvmore = true;

        for (int i = 0; recvmore && i < count_; ++i) {
            // Cheat! We never close any msg
            // because we want to steal the buffer.
            Msg msg = s_recvmsg (s_, flags_);
            if (msg == null) {
                nread = -1;
                break;
            }

            // Cheat: acquire zmq_msg buffer.
            a_[i] = msg.data();

            // Assume zmq_socket ZMQ_RVCMORE is properly set.
            recvmore = msg.has_more();
        }
        return nread;
    }