Hello @EhsaanIqbal, neffos does not give you a list of connections per room. But it's quite easy to do it by yourself, depends on your needs. For example, you have a mutex and a map of map[string][]neffos.Conn or neffos.NSConn, key is the room name and value is a list of connections. Neffos has the neffos.OnRoomJoined event which you can use to take actions when a connections joins to a room. In that event's callback you can append the connection to the specific room's list.
Hello @EhsaanIqbal, neffos does not give you a list of connections per room. But it's quite easy to do it by yourself, depends on your needs. For example, you have a mutex and a map of
map[string][]neffos.Conn
orneffos.NSConn
, key is the room name and value is a list of connections. Neffos has theneffos.OnRoomJoined
event which you can use to take actions when a connections joins to a room. In that event's callback you canappend
the connection to the specific room's list.You can get an idea at one of our examples:
https://github.com/kataras/neffos/blob/6583461bb16f4b312672a145bb428e6366294a99/_examples/wrap-conns-to-user/main.go#L26-L29