How to set connection timeout with sockets

Wright, David dwright at infiniswitch.com
Wed May 21 05:25:34 EST 2003


> I am doing an aplication with STREAM sockets and
> I need to know how can I set or modify the timeout value of
> the connection and the paquets  sent.
>
> With function  setsocketoption  I am no t able to set it.
>
> If someone knows how can I do it, please send me the answer.

You can only set the TCP keepalive time via

  /proc/sys/net/ipv4/tcp_keepalive_time

but that affects every TCP socket on the system.  You'd also
need to set tcp_keepalive_intvl and tcp_keepalive_probes to
handle this completely.

  -- David Wright, InfiniSwitch Corp.


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list