1826332 Members
3470 Online
109692 Solutions
New Discussion

setsockopt()

 
prakasse
Advisor

setsockopt()

Hi,
On the manual page for setsockopt, there is the following information: If both l_onoff and l_linger are non-zero, close() does not return until the system has tried to transmit all unsent data and release the connection gracefully. In that case, close() can return an error, and errno may be set to ETIMEDOUT, if the system is unable to transmit the data after a protocol-defined time limit. What's this time Limit? Can it be changed? On the same page it talks about SO_KEEPALIVE and the 2 time limit if SO_KEEPALIVE is enabled. Is there a way to change the 2 hour limit?

Thanks in advance,
Senthil.
1 REPLY 1
Laurent Menase
Honored Contributor

Re: setsockopt()

you have the following ndd tcp layer parameters:

tcp_ip_abort_interval which must not be set to a too low value ( 60000 1min) is a gof value.
It is the max time we try to send the FIN before reseting

tcp_keepalive_interval which specfy the keepalive timer. You can set it to low value like 1min or 2 if you don't use charged specialised line which connect on demand

the linger time can be specified if you use xopen sockets.