Page 1 of 1

isConnection()

Posted: Mon Jun 30, 2014 12:06 pm
by Tranquil
Hello Forum.

For every object, there is an is....() command. Is there a reason why not implementing an IsConnection() command for checking if the connectionID is still valid?

Re: isConnection()

Posted: Mon Jul 07, 2014 5:29 pm
by RichAlgeni
With sockets, there is no guarantee that a socket is still connected unless data is actually sent. This is true even with a local connection. The command could return a false positive. If you have a connection that you really need to know when it goes down, you could write a simple heartbeat procedure.