I have two processes that I'd like to pipe together with C#, and then send the output of the second one directly to an HTTP output stream.
In a command line, I can do this and it works perfectly (where "-" represents stdin/stdout):
proc1 "file_to_input" - | proc2 - -
My problem is connecting these two processes in C# and being able to take proc2's STDOUT and port it directly to the web, without buffering the entire thing first. The inputs and outputs will be a binary datatype, so I'll need to convert it from the default StreamReader/Writer.
Is this possible, and what is the best way to go about it? Thanks!