IP coms?
wilson
Posts: 4
Hello,
I am looking for the correct way to maintain comms with I/P devices.
I am using TCP protocol to control a matrix switcher and projectors.
The problem I seem to have is that when a device is turned off or the connection is disrupted for whatever reason, the netlinx seems to think the connection is live. Though the code I have written is looking for feedback from the device and so attempts to reconnect. This results in a 'Socket already in use' error. But fails to reconnect.
Any suggestions please?
I am looking for the correct way to maintain comms with I/P devices.
I am using TCP protocol to control a matrix switcher and projectors.
The problem I seem to have is that when a device is turned off or the connection is disrupted for whatever reason, the netlinx seems to think the connection is live. Though the code I have written is looking for feedback from the device and so attempts to reconnect. This results in a 'Socket already in use' error. But fails to reconnect.
Any suggestions please?
0
Comments
So the most solid way on TCP is to send your string to the other device, and manually wait for a response within lets say 10 seconds. Send the next data just if a response was received. If no response is comming in this time, manually assume that the unit is offline, close the IP connection, and try to reopen it. In some cases it could be better to open the TCP connect, wait for the online event, send your data, and close the connection.