k so I try for 1 hour now and it still not working
I want to get id of every socket.io user so I tried this:
var socket_list = new Array();
io.on('connection', function (socket) {... socket_list.push(socket); ...}
then
for(var soc in socket_list) { console.log(soc.id); }
but it still undefined. how to fix? thanks
it looks simple but just not working
also tried console.log(socket_list) and it worked