godot has no integrated function to open a pipe to another process. Currently OS.execute() can be used to start a process and wait for the return on stdin or start a process non-blocking but does not return the output.
You can use the network protocol, this isnt too uncommen. Using the internal loopback address 127.0.0.1 should prevent the packets to go through the whole network stack. Therefor this should be quite fast and lag free.
And there is allways the possibility to write a GDNative script but this requires advanced skills in c or c++ and compiling.