For example, my program is running, and I would like to change its state without going through its UI. I would like to open a telnet-type shell (or any other CLI) which connects to my program. I then would like to enter commands and see responses back from my program.
I can throw a Lua interpreter into my program and feed it commands, what I don't know how to do is let some other process attach to mine and communicate. I'm familiar with threads and know how to offload the interpreter and command handling. I know sockets are a thing, but I haven't a clew of how to use them to communicate between processes without writing both ends custom.
Security is not an issue, since this is a debug-only feature.
Thanks!
That said, I'm still looking for recommendations and discussion.