Answer the question
In order to leave comments, you need to log in
Solution with timers?
Can you give me a solution with timers? Maybe I'm repeating myself deeply sorry for this. But in this case, you need a solution or, say, the implementation of the plan. The next task is to send a timer from the server that counts seconds and sends them to the socket to the client. Everything seems to be simple but. How to make a timer for each room in a socket? For example, there is a room in which there can be 4 people. If less than 3 people remain in this room, then the timer must be deleted.
As I wrote above, I asked this question here and the answers I answered there with a solution, it seems to be true logically, everything is like that . That's actually this question .
The thing is, as I wrote above, no more than 4 people can be in the room. If there are more then the server creates the next room. Example in room [1]=>4 people, 5th user came to the resource. The server will create a room [2] where 5 actually goes. The timer will need to be started when there are more than 3 people in room [2], and if there are less than three, then the timer must be deleted. How can this be implemented? I tried to send UNIX to the client on the client, but it turns out that the synchronization of which network response is long, for which the browser takes a long time to load. And it turns out for one the timer stopped ticking for someone. Why and how I think it is necessary to give a countdown from the server. The timer was created by an object and given away, but it is problematic to remove it. How can this be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question