-
Notifications
You must be signed in to change notification settings - Fork 4
server side socket.io 통신 cheatsheet
younguna edited this page Nov 18, 2019
·
4 revisions
socket.emit('message', "this is a test");
io.emit('message', "this is a test");
socket.broadcast.emit('message', "this is a test");
socket.broadcast.to('game').emit('message', 'nice game');
io.in('game').emit('message', 'cool game');
socket.to('game').emit('message', 'enjoy the game');
io.of('myNamespace').emit('message', 'gg');
socket.broadcast.to(socketId).emit('message', 'for your eyes only');
Object.keys(io.sockets.sockets).forEach((socketId) => {});
© BoostCamp - Try Catch
권기웅 mosball | 나영균 younguna | 장기원 OriginJang | 조정현 JeonghyunJo