I am testing the resident script with 0 sleep interval. It works fine, I receive messages and send messages through tagged grp objects. But let's say I have another function running in a script outside of this resident script.
How can I accomplish this without opening a new connection?
Code:
function sendToMqtt(message)
-- the code to send something over mqtt on the already established connection --
end
-- script using the function
foo = 1
if foo<2 then
sendToMqtt('less than two')
end
How can I accomplish this without opening a new connection?