I have a C++ application that needs to send over images from a webcam in real-time to a C# application on the same PC. The C++ code cannot be called from the C# code so I need to implement communication via named pipes in order to send over the images.
I have never done any communications programming before and I was wondering how to approach this problem.
My first thoughts was to have the C++ application create the named pipe server on a separate thread, after creation the thread would wait continuously until a image is available to send. At that point it would send the image over.
Similarly the C# application would create a new thread that acts as the client. It would connect to the server and loop continuously until an image is available. At that point it would receive the image and store it in a queue that the main thread can access.
Does this make sense? Is this the best approach?