API Gateway Websockets - Dealing with 10 minute idle connection timeout

廉价感情. 提交于 2021-02-10 06:44:19

问题


I have simple chatroom application and if no users send any messages, the websocket closes after about 10 minutes. What is the best solution to keep the connection alive without reconnecting?


回答1:


It is always possible to send pings, the other side will have to reply with pong. (proof)

This tutorial might help you with that.



来源:https://stackoverflow.com/questions/58401092/api-gateway-websockets-dealing-with-10-minute-idle-connection-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!