We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOther Libraries › Checking for a dead socket.
Page Index Toggle Pages: 1
Checking for a dead socket. (Read 711 times)
Checking for a dead socket.
Jun 1st, 2007, 5:53pm
 
When I'm using a Client object, I need to be able to tell if the server I'm connected to has gone down, so that I can periodically try to reconnect to it. However, there is no Client method that directly does this. I tried using a write to possibly trigger SocketException, but it turns out I'm unable to catch the error, even just using a plain old Exception in the catch block. Does available() return some special code if the Server has died? Or does it just always return 0 if there is nothing to read? I guess I'll go check that right now.
Re: Checking for a dead socket.
Reply #1 - Oct 20th, 2007, 9:23pm
 
fixed this oldie but goodie for 0131.
http://dev.processing.org/bugs/show_bug.cgi?id=537
Page Index Toggle Pages: 1