nodejs websocket detect disconnected socket

前端 未结 4 2225
余生分开走
余生分开走 2021-01-04 20:30

I have a nodejs websocket server and I have the following problem.

When my clients connect to the server and terminate gracefully the onclose method is

4条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-04 21:02

    default ws implementation doesn't have a callback for network disconnects from client side

    You can find a keepAlive implementation here

提交回复
热议问题