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的設置時間範圍之內,出現網絡異常,如客戶端把掉網線,這時服務器是無法檢測到的。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章