Hello [EMAIL PROTECTED]!

On 22-Mar-00, you wrote:

 m> If I would like to read a 'open-ed connections input without
 m> closing it, how would I do it? It seems to me the only way to
 m> read from it is to close it. Is this so, or am I just plain
 m> silly? :)

You can read from a (TCP) port that has not been closed by the
other side but you cannot know how many bytes the other side sent
you --- unless it gives you this information.

The function READ-IO allows you to read all the data arrived to
the port so far.

  maxchars: 1024
  buffer: make string! maxchars
  chars: read-io port buffer maxchars

You get in CHARS the actual number of bytes read. If the buffer is
not empty, READ-IO appends the data to it.

Regards,
    Gabriele.
-- 
o--------------------) .-^-. (----------------------------------o
| Gabriele Santilli / /_/_\_\ \ Amiga Group Italia --- L'Aquila |
| GIESSE on IRC     \ \-\_/-/ /  http://www.amyresource.it/AGI/ |
o--------------------) `-v-' (----------------------------------o


Reply via email to