Hi Gregg,

On Friday, February 9, 2007, 7:18:26 PM, you wrote:

GI> Is there a fast and easy way to detect that the other end of a port
GI> has closed without doing a COPY/PART (it's a no-wait port already)?

Short answer: no.

Long  answer:  yes,  use  async-modes,  work hard until you get it
solid (there are many problems to work around), then use some kind
of  timer  to time out when you don't get data from the server for
more  than  x  seconds.  If the server is just turned off, without
having a chance to send a TCP close packet, or if the close packet
does  not  arrive, you have no way to know that the connection has
been  closed.  I  guess  the delay you see is a timeout on the TCP
stack  side.  In  principle  you should be able to avoid the delay
using  async-modes,  then  you  need to implement your own timeout
logic.

The best solution would be to wait for R3...

Regards,
   Gabriele.
-- 
Gabriele Santilli <[EMAIL PROTECTED]>  ---  http://www.rebol.com/
Colella Chiara software division --- http://www.colellachiara.com/

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to