[REBOL] Re: help from Dixon or others about port
From: g:santilli:tiscalinet:it at: 7-Sep-2001 15:54
Hello Romano!
On 06-Set-01, you wrote:
RT> I do not understand the last command:
RT> in: first l
RT> and why does it make a wait before?
The wait is not necessary in this case. L is a listen port (in
this case, it is not bound to a fixed port id, but the OS assigns
one to it which is then accessed with L/PORT-ID); it does not
receive data, but connections. So it returns connections, in the
form of ports.
listen: open tcp://:80 ; listen on port 80
connection: first listen
If you do the above and then point your web browser to localhost,
you'll get in CONNECTION the connection with the browser. LISTEN
can receive any number of connections (the OS poses limits as to
how many of them can be queued before they get "answered") and you
can get the next one with FIRST LISTEN or PICK LISTEN 1. This
operation is always blocking, and waits until a connection comes.
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/