Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connector for Socket Library that only reports Status through Callbacks #47

Open
gschellhas opened this issue Jun 19, 2024 · 2 comments

Comments

@gschellhas
Copy link

I am working in an environment that doesn't have access to Lua rocks and doesnt have access to luasockets.

The Library I have access to is a TcpSocket, found here.
https://q-syshelp.qsc.com/#Control_Scripting/Using_Lua_in_Q-Sys/TcpSocket.htm

The library is not blocking, and the environment does not allow me to block either. I have access to a Timer library found here that utilizes callbacks.
https://q-syshelp.qsc.com/#Control_Scripting/Using_Lua_in_Q-Sys/Timer.htm?TocPath=Design%257CControl%2520Scripting%257CQ-SYS%2520Extensions%2520to%2520Lua%257C_____34

Can you see a way to create a connector with this? Thank you,

@Tieske
Copy link
Contributor

Tieske commented Jun 19, 2024

That's a tough problem. This library is tightly coupling the runloop (and sockets) to the protocol implementation.

I did work on that to decouple them, see: #31 . It facilitates both blocking as well as non-blocking (== coroutine yielding) sockets. I completely rewrote the connectors there. But not sure it would be possible to handle callback based sockets.

You might want to have a look at https://luarocks.org/modules/fperrad/lua-mqtt which (afaik) only implements the protocol, not the sockets.

@gschellhas
Copy link
Author

gschellhas commented Jun 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants