0
I’m working on a server Websockets that manages connections however I can not solve this small impasse, not for lack of understanding of the code but for not knowing how to do..
Look at that,
The user connects to the server
When another user connects to the server (ie at least two are connected) they will connect by exchanging information through the server.
When the third one connects the same process has to be done, but the first two don’t need to re-connect to each other again, they just need to connect to 3 and vice versa.. for everyone to be connected..
and so on.. up to a maximum of 20 connections.
On my current server it just receives the message and forwards it to everyone connected except to the one sending the message, and this causes the third to connect with the first but not with the second ai becomes a mess...
It is worth noting that the server only forwards the messages, who treats them and make the actual connection is the user in the Browser.. The server is only the signal tower
how to do this administration in PHP or at least the logic for me to try to do it myself..
It is a websocket or is a request (ajax for example)?
– Guilherme Nascimento