3
I’m starting to work with Socket.io on Node.js, the doubt for now follows simple. Using my example below. What’s the difference in using socket.Emit() and chat.Emit()? PS:*I hope you don’t have a kkk syntax error.
var chat = io.of('/chat')
.on('connection', function (socket) {
socket.emit('testOne', {
data: 'data'
});
chat.emit('testTwo', {
data2: 'data2'
});
});