On Fri, Jan 30, 2009 at 01:34:51PM +0530, Rajkumar S wrote:
> 2009/1/30 jared r r spiegel <[email protected]>:
>
> > check the obsd manpage, it is specifically different and does not mention
> > connects:'
>
> But nc -h gives
>
> -w secs Timeout for connects and final net reads
yup, you're right. other than the uppercase 'T' that's the same string
as in the netcat i have on a debian system. i'd guess that the obsd help()
might just need an update to make it consistent with the manpage.
it's possible that *i* am just misunderstanding the obsd nc(1), but in
my experience, the timeout given by -w has nothing to do with connect
timeouts.
> So I guess obsd nc does not support timeouts for connect and will wait
> 1m15sec if host is not up?
the wait is probably whatever the underlying network stack would normally
have:
/home/jrrs $ time telnet 1.2.3.4 23
Trying 1.2.3.4...
telnet: connect to address 1.2.3.4: Connection timed out
1m15.03s real 0m0.01s user 0m0.00s system
--
jared