io.emit

Created
Created
2020 Jul 22 4:57
Tags
Tags
const io = require('socket.io')(); io.emit('an event sent to all connected clients'); // main namespace const chat = io.of('/chat'); chat.emit('an event sent to all connected clients in chat namespace');
 
 
namespace 안에 있으면 그 네임스페이스 언급하고 해야함!!
 
 
 
 
 

Recommendations