Detecting active ethernet connection
Posted: Thu May 28, 2015 11:42 am
Have an OSX and Windows application written in Livecode that is happily communicating over TCP/IP with another system and talking happily with it. All good!
This system can be on a local network with no external internet access or could be on the other side of the world, connected over the internet.
The application can sit doing nothing for several minutes and then issue a command. In an ideal world this all works well but want to add some code to check that the end user system is still there. For example if I disconnect the ethernet cable I want to capture that.
On our development OSX system the mac knows (almost) instantly that there is no ethernet connection - I cannot find a way of detecting this in Livecode, any suggestions?
One option is use ping but this is not supported directly by Livecodes (limited) socket support and the external call seems to take several seconds and tie the system up while its doing it.
So any suggestions from the community?
Thanks in advance!
Mark
This system can be on a local network with no external internet access or could be on the other side of the world, connected over the internet.
The application can sit doing nothing for several minutes and then issue a command. In an ideal world this all works well but want to add some code to check that the end user system is still there. For example if I disconnect the ethernet cable I want to capture that.
On our development OSX system the mac knows (almost) instantly that there is no ethernet connection - I cannot find a way of detecting this in Livecode, any suggestions?
One option is use ping but this is not supported directly by Livecodes (limited) socket support and the external call seems to take several seconds and tie the system up while its doing it.
So any suggestions from the community?
Thanks in advance!
Mark