gpt4 book ai didi

node.js - socket.io - xhr-polling 自动断开连接

转载 作者:搜寻专家 更新时间:2023-11-01 00:08:49 26 4
gpt4 key购买 nike

我使用 socket.io 和 xhr-polling 传输制作了简单的应用程序。
我发现服务器在我保持连接几秒钟后断开连接。

这个问题只发生在 xhr-polling transport..
我该如何解决?我错过了什么吗?

最佳答案

发件人:https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO

SERVER OPTIONS

polling duration: defaults to 20 seconds

The maximum duration of one HTTP poll, if it exceeds this limit it will be closed.

关于node.js - socket.io - xhr-polling 自动断开连接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15989718/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com