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

Adding the in(room) method #25

Closed
andreamazz opened this issue Jun 19, 2013 · 1 comment
Closed

Adding the in(room) method #25

andreamazz opened this issue Jun 19, 2013 · 1 comment

Comments

@andreamazz
Copy link

As described here, socket.io supports Rooms. This is really handy when you need to partition your users.
Unfortunately session.socket.io does not support it, because it doesn't implement the in() method call.

Any chance that you'll add it in the next release?

I made a quick hack to make it work:

this.in = function(room) {
    return io.sockets.in(room);
};

but I doubt it's the proper way, given your on() implementation.

Thanks for your great work.

@wcamarao
Copy link
Owner

You can just use io.sockets.in("room")

SessionSockets isn't meant to replace the handy io.sockets, so you're encouraged to still use io.sockets for whatever is session agnostic (e.g. emitting to a room).

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

No branches or pull requests

2 participants