[EMAIL PROTECTED] wrote:

>    find-port: func["Find a free port to connect to" /local port-num p] [
>       port-num: + random 9999 10000
>       while [error? try [p: system/words/open join tcp://: port-num]] [
>          print "while"
>          port-num: port-num + 1
>       ]
>       system/words/close p
>       port-num
>    ]

If you want a free listen port, try:

>> port: open tcp://:0
>> port/port-id
== 2891

(I'll give it a look more deeply later... too few time now. :-)

Ciao,
    /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