keepalive

{keepalive, Boolean}(TCP/IP sockets)

Enables/disables periodic transmission on a connected socket, when no other data is being exchanged. If the other end does not respond, the connection is considered broken and an error message will be sent to the controlling process. Default disabled.

 

在keepalive的设置时间范围之内,出现网络异常,如客户端把掉网线,这时服务器是无法检测到的。

你可能感兴趣的:(live)