[erlang-questions] Socket keepalive option

Edwin Fine erlang-questions_efine@REDACTED
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 <per@REDACTED> wrote:

> "Greg Burri" <greg.burri@REDACTED> 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.
>
> --Per
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080617/a7174a3a/attachment.htm>


More information about the erlang-questions mailing list