[REBOL] Re: tcp port open?
From: g:santilli:tiscalinet:it at: 10-Oct-2001 15:06
Maarten Koopmans wrote:
> Is there a way to now if a tcp port is open on both sides. So that a server
> (or client) can see whether or not the other side of the pipe is still open?
As long as the TCP stack has received the close packet, you can.
If you open the port as /no-wait, using COPY will return (AFAIK):
- a non-empty string, i.e. the data;
- an empty string, meaning the connection is open but there's no
data available in the buffers;
- NONE, meaning the port has been closed on the other side.
HTH,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/