socket.setKeepAlive([options])
options<Object>- 返回:<net.Socket> 插座本身。
使用一个选项对象来配置保持连接。有关每个属性的说明,请参见socket.setKeepAlive()。
🌐 Configure keep-alive using an options object. See socket.setKeepAlive()
for a description of each property.
socket.setKeepAlive({ enable: true, initialDelay: 1000, interval: 1000, count: 10 });