Node.js 中的 setKeepAlive 是如何工作的以及如何实现?
无法理解 Node.js 网络套接字中 setKeepAlive 方法的原理。 initialDelay 完成后会发生什么?
Cannot understand the philosophy of setKeepAlive method in Node.js' net sockets. What happens after initialDelay finishes?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此方法控制底层 TCP 套接字上的 TCP 保持活动功能。有关 TCP Keepalive 的信息,请查看本文。下面的代码片段解释了
initialDelay
(“keepalive 计时器”)的作用:This method controls TCP keep-alive functionality on the underlying TCP socket. Check out this article for information on TCP Keepalive. Here's a snippet that explains what
initialDelay
(the "keepalive timer") does: