socket.io
socket.io copied to clipboard
emit not working inside a loop
hey can you help me. the io.volatile.emit is not working inside a loop
for(j= 0; j < result.length; j++){
io.volatile.emit('notification_'+j, "notify user");
}
What does it means "it's not working" ?
Also, just in case, if you must be sure your messages wont be dropped, use io.emit instead of io.volatile.emit
Closed due to inactivity, please reopen if needed.