0
房間
TypeError: Object #<Manager> has no method 'in'
at Query.<anonymous> (/root/server.js:553:19)
at /root/node_modules/mongoose/node_modules/kareem/index.js:177:19
at /root/node_modules/mongoose/node_modules/kareem/index.js:109:16
at process._tickCallback (node.js:419:13)
我的代碼:
var socketio = require('socket.io');
var router = express();
var server = http.createServer(router);
var io = socketio.listen(server);
io.in(room).emit("inGame",Date.now()+10000);`
你能分享一些代碼而不是錯誤和單行代碼嗎? –
增加了更多信息每一段代碼都是無關緊要的。 – Fastboy619
什麼是變量「房間」,以及語法「io.in()。emit」中的文檔在哪裏? –