最終更新:2018-11-05 (月) 04:59:14 (14d)  

Socket.IO/送信 はてなブックマークを見る
Top / Socket.IO / 送信

  • io.emit/io.sockets.emitemit an event to all connected sockets
    socket.emitemit an event to the socket
    socket.broadcast.emitsending a message to everyone else except for the socket that starts it.
    socket.to(room).emitexcept sender
    socket.to(room1).to(room2).emitexcept sender
    socket.in(room).emitincluding sender
    io.of(namespace).emitincluding sender
    io.of(namespace).to(room).emitincluding sender
    io.to(id).emitsend to id
  • socket.to(socket.id).emit()` will NOT work

チートシート

関連