Start other program and send receive data to it

I have an automated GPU test I am making with Unreal Engine, and I want to use it as a part of multitude of computer tests (also in the making) to click start and wait for all the tests to run themselves. What I want to do is open the unreal game, send a data packet/file/whatnot with what settings to run the GPU test with, and wait to receive the results from the Unreal Engine GPU test when it finishes.

In my thoughts, I was thinking maybe using an input file and output file (c++ creates the input file with settings, then opens the GPU test. GPU test finishes, creates output file and then closes. C++ continues on when it finds the output file; given, both c++ and unreal are in the same local folder), but it could have some problems I think? It just seams like there may be something much simpler or less hazardous possible- specially since Unreal Engine uses c++.
Can you use a pipe instead of a file? See if your system supports the popen() or pipe() system calls.
I am using Windows 10, but I want to make it support Mac and Linux too
Probably the most portable solution is to use a socket, then. The code is pretty much unchanged across systems. Plus it opens up the possibility of putting both processes in separate computers.
Take a look at boost::asio. Here's an example that implements a simple chat server and client: https://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp11/chat/
Topic archived. No new replies allowed.