I have a DAQ device that is acquiring data from 100 channels at 10 Hz in a while loop. Now, part of the data is used on the local computer, part of them needs to be send to another computer. I'm trying to use TCP/IP to do it.
The problem is, however, the client server may not be running all the time and I still need to the server program to run on the local computer. If I put my TCP open outside the while loop, then the loop won't execute until a connection is established. If I put it inside the loop, it will try to open the port every time the loop executes (10 Hz). Idealy, once the client program is running, connection established, the program should never try to re-connect until the client program is shut down. This seemingly simple requirement has turn out to be a headache for me. Any good ideas?
pellet