There are multiple client programs that periodically connect to a port on my server and send a single line of text.
When a connection to the port is made I need to start a PHP CLI script that processes the data. There may be many of the remote scripts running/connecting at more or less the same time so I think it would be best if socat forked a process for each connection to run the script.
I've gotten socat to do most of what I need, using the command
socat tcp-l:myport,fork exec:mypath/socatTest.php
I can read the input on php://stdIn. All is good.
The problem is that the process doesn't seem to fork, so if a second external program sends data while another is doing the same it gets a connection refused error.
Where have I gone wrong?