I'm trying to merge 2 TCP streams into one and then send the result outside through a TCP port server. The first part is Ok, I'm able to capture incoming streams as below:
STREAM1: socat TCP:127.0.0.1:5755 TCP:127.0.0.1:8888 STREAM2: socat TCP:127.0.0.1:5754 TCP:127.0.0.1:8888
I can also see the merged results using again socat:
socat tcp-listen:8888,reuseaddr,ignoreeof,fork -
so for the stdout is working but how to redirect the merged stream to a TCP port (e.g. 9999)? I've tried:
socat tcp-listen:8888,reuseaddr,ignoreeof,fork tcp4:127.0.0.1:9999
but I've a Broken pipe issue on STREAM1 and STREAM2 and the tcp-listen above send out a "Connection refused" message.
Can you help me?