I have created a program which sends out a message via TCPSend to every computer in the building. If the computer has the client application running which listens to a specific port, everything works great. However, if a computer does not have the client running, the TCPConnect takes 20 seconds before it fails. I have about 300 computers I need to connect to with this program so 20 seconds for each failed computer is a long time to wait. (This application is meant to send emergency notifications)
Is there a way to change the timeout period for TCPConnect, or any way to skip a computer if it is not listening to that particular port? Opt(TCPTimeout) is already set for 100 milliseconds by default (and I have adjusted it lower) so I am not sure how to make the TCPConnect fail faster if it cannot send to that port. Obviously, if the client is running on each and every computer, this would not be a problem; however, even just 10 computers without the client running could really slow things down.
Any ideas?