-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
Hi,
I am embedding Lua in my Qt application. However, it seems to me that running luamqtt would require me to run it in a separate thread, because it uses its own eventloop. Is it possible to run luamqtt via a custom eventloop? The workflow would be:
- Open a socket via Qt
- Wait for data via the Qt event-loop
- When something gets read, the C++ code runs a lua function, that handles the communication, possibly calling some sort of a callback that sends data over the socket back.
- The connection would stay alive for the runtime of the C++ application
Is it possible to implement something like this? I can see that there is an iteration
function, that would maybe work for this usecase? I'm not how many iterations would one operation take and also, I don't want the Lua code to block if the connection is disrupted (when an operation gets a timeout). Or maybe I can use a custom connector? From what I can read, the connector doesn't allow me to use a custom eventloop.
Thanks
Metadata
Metadata
Assignees
Labels
No labels