If you are experiencing an issue please mention the full platform your
issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10
Simulator 3.7
Device IPhone 6 Plus
I have tested on Android and IOS
import ca.weblite.codename1.net.Socket;
try{
ServerCommsKeepAliveSocket = new Socket(inc.host.getText(),
inc.ServerCommsKeepAliveSocketPort, inc.socketTimeOut);
ServerCommsKeepAliveSocket.close();
// Server is reachable
}catch(Exception e) {
// Server Is Not Reachable
}
Andorid works where as IOS causes a permenant lock.
The App is stuck and will not return from the "ServerCommsKeepAliveSocket =
new Socket(inc.host.getText(), inc.ServerCommsKeepAliveSocketPort,
inc.socketTimeOut);"
My Question is:
What is the best approach to testing if a Server / Socket is reachable w/o
blocking forever in the case where the Server is down?
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/7409da0b-1fe7-45f5-bf14-90c34547cf61%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.