API Gateway Websockets-处理10分钟的空闲连接超时 [英] API Gateway Websockets - Dealing with 10 minute idle connection timeout

查看:134
本文介绍了API Gateway Websockets-处理10分钟的空闲连接超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的聊天室应用程序,如果没有用户发送任何消息,则Websocket将在10分钟后关闭.在不重新连接的情况下保持连接存活的最佳解决方案是什么?

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?

推荐答案

总是可以发送ping信号,另一端将不得不用pong进行回复.(证明)

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

此教程可能会帮助您.

这篇关于API Gateway Websockets-处理10分钟的空闲连接超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆