socat -u tcp4-connect:127.0.0.1:30978,forever,interval=5,fork STDOUT | exec /home/pi/builds/dump978/uat2esnt | socat -u STDIN tcp4-listen:30977,forever,interval=5,fork
This should do it a bit better with socat like you said. Like Rick Astly it will never give up, not let you down, and will keep listening forever, retrying every 5 seconds until it reconnects. Tested running it against my dump1090 message log, restarting the Pi and Dump1090.
while true
do
socat -v -u tcp4-connect:127.0.0.1:30978,forever,interval=5,fork STDOUT | exec /home/pi/builds/dump978/uat2esnt | socat -v -u STDIN tcp4-listen:30977,forever,interval=5,fork
sleep 5
done
This looks right? Maybe.
And to others interesting I will try and make this easier to setup soon…