CNode

Option polling duration is not valid.

问答
Yyakczh发布于11 年前最后回复11 年前1 回复5904 浏览0 收藏

socket.io用了xhr-polling 这个长轮讯的最长的值是多少, io.set('polling duration',500); 这样提示Option polling duration is not valid. Please refer to the README. https://github.com/Automattic/socket.io/wiki/Configuring-Socket.IO 这上面只有缺省值

查看回复

回复 (1)

X
xinyuanyu#1·11 年前
  1. 看socket.io的版本,那个文档是0.9以下的
  2. 版本正确的话,把transports 的值只写成xhr-polling
  3. 看源码,直接上去搜索polling duration, 看看默认20的那一段代码

题外话,那个文档貌似有些地方不太给力的,上次设置store就有点不太一样

参与回复
登录后即可参与回复。登录