I am new to node.js i want to emit socket to specific socket id but i am getting Object #<Namespace> has no method 'socket'
error. Here is my code:-
var io = socketio.listen(app)
io.sockets.on('connection', function (socket) {
socket.on("user-typing", function (data) {
io.sockets.socket(socket.id).emit('user-typing-start', "End Typing");//i am getting error here
})
});
I am using socket.io v1.0. i have already try this answer but not working:- This
Please help thanks in advance.