I want to run an external application and write its output. It is quite easy to use Diagnostics.Processit OutputStream.
However, the process that I created the binary data that I need to write as Stream, rather than as textStreamWriter
Is there a way to get the underlying raw binary stream?
I am currently hacking it by running a batch file that looks like this:
myapplication | socat stdin tcp-connect:localhost:12345
And in my code, I create and listen on a TCP socket. while this hack works, it is a little ugly, and I prefer to use an external process directly.
(One thing I cannot do is to use local files, since real-time data is inherently in nature)
source
share