@Override
    public boolean xsend (Msg msg_, int flags_)
    {
        //  If we've sent a request and we still haven't got the reply,
        //  we can't send another request.
        if (receiving_reply) {
            throw new IllegalStateException("Cannot send another request");
        }

        //  First part of the request is the request identity.
        if (message_begins) {
            Msg bottom = new Msg();
            bottom.set_flags (Msg.more);
            boolean rc = super.xsend (bottom, 0);
            if (!rc)
                return false;
            message_begins = false;
        }

        boolean more = msg_.has_more();

        boolean rc = super.xsend (msg_, flags_);
        if (!rc)
            return rc;

        //  If the request was fully sent, flip the FSM into reply-receiving state.
        if (!more) {
            receiving_reply = true;
            message_begins = true;
        }

        return true;
    }