Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NguyenTungs opened this issue Feb 24, 2017 · 2 comments · Fixed by #2879
Closed

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

NguyenTungs opened this issue Feb 24, 2017 · 2 comments · Fixed by #2879

Comments

@NguyenTungs
Copy link

NguyenTungs commented Feb 24, 2017

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!

@darrachequesne
Copy link
Member

Yes, that has already been suggested: #2466

PR is welcome!

@NguyenTungs
Copy link
Author

NguyenTungs commented Feb 25, 2017

@darrachequesne
The first give my love to you :)

It's mean :

socket.join(['roomOne', 'roomTwo', 'roomThree']).

I really can do it this way now, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants