> Are you sure this script works as intended? > > Doing: > socat tcp-listen:12345,fork PIPE & > > socat PIPE:P tcp:127.0.0.1:12345 & > > echo foo > P > > ... causes endless traffic, since listener echoes > P back, that gets written to P, socat reads from it, > eches foo to server, that sends to client, ... > heh, I got bitten for that too, that is why I have echo PING >&3 && read line <&3 the moment that you read it from the fd, it does not come back to the socket and you break the loop. I like this approach because it guarantees the packet traverse the network , but I think we can make it unidirectionally and just dump the other side in a It is surprisingly more complex than I thought to create a persistent connection that you can reuse in the test.. Let me try to find a simpler way