function acceptSocket(user, sockets) {
                    let userFound = false;
                    if (sockets) {
                        for (let i = 0; i < sockets.length; i++) {
                            if (sockets[i].address == user.address) {
                                userFound = true;
                            }
                        }
                    }
                    if (!userFound && user.address) {
                        sockets.push(user);
                    }
                    io.sockets.emit('updateConnected', sockets.length);
                }
// IIFE: function to accept new socket.id in sockets array.
function to accept new socket.id in sockets array.
function to accept new socket . id in sockets array .
function acceptSocket(user, sockets) {
                    let userFound = false;
                    if (sockets) {
                        for (let i = 0; i < sockets.length; i++) {
                            if (sockets[i].address == user.address) {
                                userFound = true;
                            }
                        }
                    }
                    if (!userFound && user.address) {
                        sockets.push(user);
                    }
                    io.sockets.emit('updateConnected', sockets.length);
                }
function acceptSocket ( user , sockets ) { let userFound = false ; if ( sockets ) { for ( let i = 0 ; i < sockets . length ; i ++ ) { if ( sockets [ i ] . address == user . address ) { userFound = true ; } } } if ( ! userFound && user . address ) { sockets . push ( user ) ; } io . sockets . emit ( 'updateConnected' , sockets . length ) ; }
IIFE: function to accept new socket.id in sockets array.
IIFE : function to accept new socket . id in sockets array .