# Raet Test FloScript

house minion

init .raet.road.stack.local to uid 0 name "minion" host "" port 7531 \
    basedirpath "/tmp/raet/test/keep/"


framer minionudpstack be active first start
    frame start
        do raet road stack per inode ".raet.road.stack"
        exit
            do raet road stack closer per inode ".raet.road.stack."

framer bootstrap be active first join
    frame join
        print Joining...
        enter
            do raet road stack joiner per inode ".raet.road.stack."
        recur
            do raet road stack joined per inode ".raet.road.stack."

    go next if joined in .raet.road.stack.status
    go abort if elapsed >= 5

    frame joined
        print Joined
        go next

    frame allow
        print Allowing...
        enter
            do raet road stack allower per inode ".raet.road.stack."
        recur
            do raet road stack allowed per inode ".raet.road.stack."

    go next if allowed in .raet.road.stack.status
    go abort if elapsed >= 5


    frame allowed
        print Allowed
        go next

    frame message
        print Messaging...
        enter
            do raet road stack messenger to contents "Minion 1 Hello" code 15 \
                per inode ".raet.road.stack."
        go next

    frame idle
        print Idling...
        do raet road stack idled per inode ".raet.road.stack."
        go abort if idled in .raet.road.stack.status

    frame abort
        bid stop all

