[erlang-questions] tcp keepalive option

Tony Rogvall <>
Wed Dec 31 16:59:15 CET 2008


And now you can regard your self as the TCP keepalive expert and
help out answer questions about this topic.

/Tony

On 30 dec 2008, at 17.47, AndrewJStone wrote:

> So,
> Once again I have to answer my own question...
>
> In case anyone is curious the answer is that when a TCP keepalive
> timeout occurs you get a tcp_error message with Reason "etimedout"
>
> -Andrew
>
> On Dec 25, 3:18 am, Andrew Stone <> wrote:
>> Hi,
>>
>> I'm currently trying to test code that sets the sockopt {keepalive,  
>> true} along with {active, true} in gen_tcp:listen, which is  
>> inherited by the connected socket. However, after much searching I  
>> am unable to figure out what happens when the actual connection  
>> times out.
>>
>> If a TCP keepalive timeout occurs, does the erlang process receive  
>> a {tcp_error, Sock, Reason} message or does it receive a  
>> {tcp_closed, Sock} message.
>>
>> Thanks,
>> Andrew
>>
>> _______________________________________________
>> erlang-questions mailing list
>> ://www.erlang.org/mailman/listinfo/erlang-questions
> _______________________________________________
> erlang-questions mailing list
> 
> http://www.erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list