[erlang-questions] tcp keepalive option

Andrew Stone <>
Thu Dec 25 09:18:27 CET 2008


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




More information about the erlang-questions mailing list