Skip to content

[Question] - How to client can join two room the same time? #2877

Closed
@NguyenTungs

Description

@NguyenTungs

Hi everyone!

In my project have a user , that user can in two channel , but i wanna this user can receive notifications for two channel different.

I can ask a question?
How to Client can join multiple room and receive 2 notifications the same time for different two rooms.
i just found this code run on server :

On server.js

   io.sockets.to( 'channel01' ).to( 'channel02' ).emit('pushInfo', 'Nguyen Son Tung');

So why not features :

   socket.join( 'channel01' ).join( 'channel02' );

Many thanks!

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