
Ask HN: C debug console server recommendaiton - SemanticDevice
I am looking for a recommendation (library or technology) for a server that can run inside my program to which I can send commands from a client program running on the same machine. The approach must run on Linux and Windows and be written in C (tough I&#x27;m sure I can get C++ to work).<p>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.<p>I can throw a Lua interpreter into my program and feed it commands, what I don&#x27;t know how to do is let some other process attach to mine and communicate. I&#x27;m familiar with threads and know how to offload the interpreter and command handling. I know sockets are a thing, but I haven&#x27;t a clew of how to use them to communicate between processes without writing both ends custom.<p>Security is not an issue, since this is a debug-only feature.<p>Thanks!
======
SemanticDevice
OP here... I just ran across ZeroMQ [0], which looks like it makes IPC simple
and has bindings to many languages. The disadvantage is that I will still have
to roll my own client, but it looks like I throw something together on the
client side using Python.

That said, I'm still looking for recommendations and discussion.

0: [https://zeromq.org](https://zeromq.org)

------
qppo
You can always read from stdin

