node . socket.emit과 io.emit 차이.

node . socket.emit과 io.emit 차이.

더시민 0 643 0

socket은 해당 소켓에서 해당 브라우저만에서

io.emit 은 해당 소켓 전부

 

 socket.on('powerballResult', async () => {           
            this.io.emit('messages', {
                data: (await Database.powerball_result(room.mb_id)).map((el) => {             
                    return el;
                    
                })                
            });        
        });

io.emit 혹은 socket.emit 

 

0 Comments
제목
Category
Facebook Twitter GooglePlus KakaoStory KakaoTalk NaverBand