socket-io广播

发送给其他人 socket.broadcast.emit('userConnection', {user: socket.id});  

发送给所有人 io.emit('userConnection', {user: socket.id}); 

 

posted @ 2017-09-13 18:16  笑傲江湖ad8  阅读(192)  评论(0编辑  收藏  举报