gre.receive event

gre.receive_event(
    channel
)
            

Receive an event from a Storyboard IO channel.  This is a blocking call and works best when used on a separate Lua thread.

Parameters: channel A Storyboard IO channel to receive the event on.

Returns: event A table containing the name, target, format and a data table from a received event. Example:

-- Receive a Storyboard IO event with data payload x, y, z:
ev = gre.receive_event("my_channel")

if ev ~= nil then
    print(ev.name)

    for k,v in pairs(ev.data) do
        print(tostring(k).." "..tostring(v))
    end
end

--To disconnect from my_channel:
gre.greio_disconnect("my_channel", true)
            
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

0 comments

Article is closed for comments.