[erlang-questions] Socket keepalive option
Tue Jun 17 15:01:44 CEST 2008
Isn't he asking if there is any way to do this on a per-process basis,
rather than for every process in the system?
On Mon, Jun 16, 2008 at 7:19 PM, Per Hedeland <> wrote:
> "Greg Burri" <> wrote:
> >Thanks for your reply and explanation.
> >I have theses values for a Debian distribution (Linux 2.6.25-2-amd64) :
> >#> sysctl -a | grep keepalive
> >net.ipv4.tcp_keepalive_time = 7200
> >net.ipv4.tcp_keepalive_probes = 9
> >net.ipv4.tcp_keepalive_intvl = 75
> >Theses values are in second, so the tcp_keepalive_timetime is 2 hours.
> >Is it possible to set this value directly from erlang code without
> >changing the global system value ?
> On Linux (only, as far as I know), you can set those parameters per
> socket with setsockopt() calls, see tcp(7). Of course there is no direct
> support for those in Erlang, but you should be able to do them with the
> "raw" form of Option for inet:setopts/2.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions