Hi
When using serial ports there is a function called IsSerialPort() that can be used to determine if the serial port has been correctly initialized etc. I would like to suggest an IsConnection(Connection) function that can be used to determine if the Connection is valid. This would avoid errors with CloseConnection() when the connection is not valid. I have found that some buggy TCP/IP devices can drop the network connection and I need to reconnect to the device but then I am not sure whether to call CloseConnection() before reconnecting. Since there is no way to check if the connection is valid I risk causing an error in my code. So it would be better to be able to check the connection first before calling CloseConnection(). The alternative would be for CloseConnection() not to cause an error when passed an invalid connection.
Thanks,
Simon
IsConnection(Connection)
IsConnection(Connection)
Simon White
dCipher Computing
dCipher Computing