I want to launch an external application, and capture its output.
That's pretty easy, using Diagnostics.Process and its OutputStream.
However, the process I have generated binary data, which I need to capture as a Stream, not as the textual StreamWriter
Its there a way to get the underlying raw binary stream?
Currently, I hack it by launching a batch file which looks like:
myapplication | socat stdin tcp-connect:localhost:12345
And in my code I create and listen on a TCP socket. while this hack works, its a bit ugly, and I prefer to use the external process directly.
(One thing I can't do is use local files, as the data is real-time in its nature)