Suppose I have a C++ application that would read keyboard inputs and print it to console whenever a character is pressed. So if I press "hello" (without the cursor having to be in a specific window), the app would print "h", "e", "l", "l", "o" sequentially (without needing "hello" to complete").
I would want to send this sequence to another application that is written in another language e.g. C# in Unity or Python. So in a sense, C++ is like a server that is streaming strings to a C# client. And the client should receive each character immediately as soon as C++ generates it. Client should also be able to send some text to server also. E.g. command to tell the server to pause reading keyboard inputs for a few seconds.
I'm thinking that this should be an IPC (inter-process communication) problem because the client will be in the same machine as the server. We can have multiple clients in the same machine that connects to the same server.
So if we have a server, a C# client, a python client, both clients would receive the same text sequence from the server. And if C# client tells the server to stop, the python client also would not receive the text as well.
The OS that it should work on is Windows. But if it would work on both Unix and Windows then that's better.
What's a good IPC approach that fits all my requirements?
PS. In real use case, I would send 1,000 characters string 100 times a second to the client instead of sending keystrokes. But it would still be a very tiny amount because it's in the same computer.