socketHelper exports.io=null;exports.socketArray=[];exports.init=function(io){this.io=io;}exports.addSocket=function(socket){this.socketArray.push({socket:socket,socketId:socket.id});};exports.setSocketName=function(name,socket){var len=thi
exports.io=null; exports.socketArray=[]; exports.init=function(io){ this.io=io; } exports.addSocket=function(socket){ this.socketArray.push({socket:socket,socketId:socket.id}); }; exports.setSocketName=function(name,socket){ var len=this.socketArray?this.socketArray.length:0; for(var i=0;i-1){ this.socketArray.splice(objIndex,1); } }; exports.sendAll=function(key,obj){ if(this.io){ this.io.sockets.emit(key,obj); } else{ var len=this.socketArray?this.socketArray.length:0; for(var i=0;i