socket.io icon indicating copy to clipboard operation
socket.io copied to clipboard

socket.to(roomid) doesn't include the sender himself.

Open hatelove85911 opened this issue 11 years ago • 2 comments

I'm using version 1.3.5.

My understanding is socket.broadcast.to(roomid) is to exclude the sender for being notified. while socket.to(roomid) will include the sender himself. But it's not the case in 1.3.5 I think it's a bug

hatelove85911 avatar Jul 05 '15 06:07 hatelove85911

Here are my notes on behavior socket.emit = to selected socket io.emit() = to all sockets (identical to io.sockets.emit) io.sockets.emit = to all sockets socket.broadcast.emit = excludes current socket io.sockets.in(room).emit = to all sockets in the room including this one if it's in the room socket.to(room).emit = to all sockets in the room excluding this one if a bad room is given (undefined) nothing happens: no exceptions/errors/crashes

tecnogram888 avatar Jul 15 '15 16:07 tecnogram888

That issue was closed automatically. Please check if your issue is fixed with the latest release, and reopen if needed (with a fiddle reproducing the issue if possible).

darrachequesne avatar Jan 12 '17 15:01 darrachequesne