M
M
MUTOgen4eg2017-03-17 15:13:54
Socket.io
MUTOgen4eg, 2017-03-17 15:13:54

How to get data in socket.io from a room without making a Join there?

There was such a question. Usually in the classic examples of using the room mechanism, in order to receive messages from there, you need to "enter" the room through join.
Is there any way to find out the number of messages in a room without going into it? Those. kind of admin. For example, initially the number of messages is 0, and as users of the room write messages, the counter would grow, but the admin is not listed in the room online.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2017-03-17
@SPAHI4

Where do you get the list of rooms from? Let it be a subscription to a list of rooms, where you can increment the number of messages

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question