Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Checking for broken connections

From: mattsmac::hotmail::com at: 3-Nov-2003 11:48

Ok, I asked this question a while ago and got some good answers, but a scenario has risen that I wasn't counting on before, and the previous solution doesn't work. Suppose you have a sever running: s: open/lines/no-wait tcp://:8000 v: first s And a client: c: open/lines/no-wait tcp://ip-address:8000 well if the client connection closes either because rebol closed down or the connection was closed with a 'close c' command, you can check if the client is still connected or not using 'check: copy v' on the server end and as long as it doesn't return 'none', the connection is still active. Well I discovered today that if the client computer turns off abrubtly (say from a power outage) or crashes, that the connection will still come back as active using this approach. Even though the remote computer is turned off (obviously disconnected) a copy on the server does not return 'none'. Does anyone know a solid way to check for this under such circumstances?? Matt