roYal roYal - 2 months ago 10
Node.js Question

socket.Io issue in newer version

I'm following this old guide and try to convert it to newer version of socket.io

My issue is that this code

var myNamespace = self.namespace.connected[socket.id];

dosen't work in newer versions.

I believe that it is the
[socket.id]
that has been changed in newer versions.

I saw this post and the last comment has the same problem as I but no solutions.
https://github.com/socketio/socket.io/issues/1618

Answer

I found the solution

var myNamespace = self.namespace.connected['/name_space#' +socket.client.id];
Comments