An external data provider makes a tcp connection to one of our servers.
I would like to use socat to 'multiplex' the incoming data so that multiple programs can receive data sent from the external data provider.
socat -u TCP4-LISTEN:42000,reuseaddr,fork OPEN:/home/me/my.log,creat,append
happily accepts incoming data and puts it into a file.
What I'd like to do is something that will allow local programs to connect to a TCP port and begin to receive data that arrives from connections to the external port. I tried
socat -u TCP4-LISTEN:42000,reuseaddr,fork TCP4-LISTEN:43000,reuseaddr
but that doesn't work. I haven't been able to find any examples in the socat doco that seem relevant to back to back TCP servers.
Can someone point me in the right direction?