【发布时间】:2013-09-29 19:00:58
【问题描述】:
我收到此错误消息
TypeError: Object [object Object] 没有方法'emit'
尝试访问helpQue 中的套接字时,该套接字由helpQue.push(socket) 构造。
helpQue 和 cxsQue 都是套接字数组。
setInterval(function() {
if(helpQue.length > 0 && cxsQue.length > 0) {
var id = makeid(),
helpee = helpQue.splice(0, 1);
helpee.emit('server-output', 'Test'); //ERROR here
}
}, 1000);
【问题讨论】:
标签: javascript node.js socket.io