I'm trying to build some basic chat (based with rooms) using socket.io versions: "socket.io": "^2.1.1" "socket.io-client": "^2.1.1"
I have a few basic questions that I couldn't find any working answers no matter how deep I looked for them.
-
When a user gets in a specific room I'm doing it (in the server)
socket.join(roomName)so the room 'exists' only if there is at least on socket connected to this room ? -
I want to create a screen with the rooms name and the number of the participates - (is it possible to get it by the client side socketIO's object ?), I found that it's possible to get the rooms names(server-side) by using
io.sockets.adapter.roomsbut I get really weird strings which are definitely not the room names. -
I'm trying to create a page inside each room that shows the users that are connected to that room (connection that got into a room with
socket.join(roomName))
I'm new to socket.io I hope someone can help me to understand better how to work with that, and what I'm missing in here.
thanks!
from socket io rooms names and number of users inside specific room
No comments:
Post a Comment