Skip to content

Broadcast to local instance only when using the redis-adapter #3217

Closed
@sleimanx2

Description

@sleimanx2

it's possible to add the local flag when emitting to a room

 // sending to all clients on this node (when using multiple nodes)
 io.to(channel).local
     .emit(message.event, channel, message.data)

however, when broadcasting from a socket instance it's not possible to add a local flag is there any way to achieve the same behavior?

// this wont work
socket.broadcast.to(channel).local
      .emit(message.event, channel, message.data);

thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions