Closed fselcukcan closed 8 years ago
Isn't that what namespaces and rooms are for?
Each koaSocket
instance has .socket
member which references the raw socket.io instance, so you can roll rooms that way.
koaSocket
also keeps a map of connections as a convenience, you should be able to use that to do something more specific, but I'm not convinced koaSocket should handle that itself.
So while using koa-socket all the names from the socket.io is available to me, right?
Yeah I want to make sure that anything possible with raw socket.io is available here, only using wrappers when absolutely necessary.
Just grab the socket.io instance on connection and you can do whatever you like from there.
On Sun, Jan 24, 2016 at 12:37 PM, Işık Faruk S. notifications@github.com wrote:
So while using koa-socket all the names from the socket.io is available to me, right?
Reply to this email directly or view it on GitHub: https://github.com/mattstyles/koa-socket/issues/10#issuecomment-174292699
Is there a way to select the audience to broadcast more specifically and controlled?
For example, each connecting client can have its own broadcast group of sockets and that sockets can be stored in a db on connection to a client know whom to broadcast based on some arbitrary logic that may be based on the socket identifications.
Having access to all connected sockets list and some subsetting/rooming of them would be useful/neccessary.