最終更新:2020-05-21 (木) 14:28:35 (126d)  

socket.to
Top / socket.to

Sets a modifier for a subsequent event emission that the event will only be broadcasted to clients that have joined the given room (the socket itself being excluded).

注意

  • socket.to(socket.id).emit()
    • will NOT work, as it will send to everyone in the room named `socket.id` but the sender. Please use the classic `socket.emit()` instead.
  • socket.toは自身は除くので自分宛てには送られない

関連