how to change connect() timeout? (net.inet.tcp.keepinit)

Is there any way to change net.inet.tcp.keepinit value?
When I tried “#sysctl -a”, I can’t find net.inet.tcp.keepinit key.

It seems that it takes 75 seconds for a connect to fail.
I believe, it is the default connect() timeout in FreeBSD.
Thanks in advance.

On 23 Sep 2004 01:35:56 GMT, jungcw@kr.ibm.com wrote:

Is there any way to change net.inet.tcp.keepinit value?
When I tried “#sysctl -a”, I can’t find net.inet.tcp.keepinit key.

It seems that it takes 75 seconds for a connect to fail.
I believe, it is the default connect() timeout in FreeBSD.
Thanks in advance.

I don’t know about sysctl, but are your aware that there are other ways to
create your own timeout on connect?

For example, you can set the socket fd to non-blocking before you call
connect(). connect() then returns immediately and you need to select() to
complete the connect operation. This is a bit tricky but it does allow you
to have your own timeouts. Stevens gives full details on how to do this.

The other way is just to put an alarm() or other SIGNAL breakout on the
connect() which will then fail with EINTR. Ugly but I’ve seen it done many
times.

Hope this helps

Rob Rutherford