Reputation: 285
i was using socket.io with the 0.9.16 version and when i upgraded it, io.sockets.socket doesn't work
io.sockets.socket(usernames[usr]).emit('event', msg, username);
this "socket" doesn't work in socket.io 1.3.5 i have this error
Missing error handler on `socket`.
TypeError: Property 'sockets' of object #<Server> is not a function
at Socket.<anonymous> (E:\xamp\htdocs\connexion\test_server_2.js:260:8)
at Socket.emit (events.js:106:17)
Upvotes: 0
Views: 68
Reputation: 195
io.sockets.connected[usernames[usr]].emit('event', msg, username);
Method changed in 1.0
Upvotes: 1