-
Notifications
You must be signed in to change notification settings - Fork 486
Difference between socket.join and io.adapter.remoteJoin? #171
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
Comments
@robinclark Sample use-case: #125 (comment) |
Do you have any suggestion to make the documentation clearer? Help is welcome! |
I think my socket.io knowledge was just a bit lacking. I assumed that joining rooms normally across nodes would have worked without special handling. Nice addition! |
Here is a good question...do we need to run both socket.join() and socket.remoteJoin()?? or just socket.remoteJoin()? |
@knoxcard i have the same question, not sure if we should call both .join() and remotejoin(). |
io.on('connect', socket => {
socket.join('room1');
socket.on('test', () => {
socket.join('room2');
});
});
io.of('/').adapter.remoteJoin(socketId, 'room1'); |
I'm not sure I'm understanding the differences. Would someone mind clarifying?
The text was updated successfully, but these errors were encountered: