[REBOL] Re: timeout
From: ptretter:charter at: 9-Apr-2001 20:56
here is an example script thats a port scanner (my intent is to make it much
more than that). Right now it has system/schemes/default/timeout: 1
However if you change it to 0:0.5 it responds much slower - why?
REBOL [
Title: "Port Scanner"
Author: "Paul Tretter"
]
system/schemes/default/timeout: 1
host: Ask "Enter ip address or fully qualified hostname
ex.(ftp.microsoft.com) "
port: to-integer Ask "Enter start port "
End: to-integer Ask "Enter End port "
newhost: rejoin [tcp:// host]
while [(end + 1) <> port][
getports: rejoin [newhost ":" port]
either error? error: try [open getports][
disarm error
print ["nothing at port " port]
][
print ["port " port " available"]
]
port: port + 1
]
halt