Sending a file continuously via netcat/socat
<p>I want to send a file from one Raspberry Pi to another continuously (until they are powered off or something). I am sending data from one Pi to an AP, and forwarding that data from that AP to the other Pi. I am using the current code to send the file once (successfully): </p>

<p>Receiver: <code>socat TCP-LISTEN:4242 /home/pi/Desktop/smth</code></p>

<p>Sender: <code>socat TCP:hostname:4242 /home/pi/Desktop/zeroMega.dat</code></p>

<p>The file I'm sending (zeroMega.dat) is a randomly generated file, since I don't care about the data and just need to continuously send (loop) this file of 1 MB from one Pi to the other. How could I do this? I know I probably need to create a script to run this continuously, especially since I need this to run on startup. Any help would be appreciated. Thanks.</p>