Note that there are some explanatory texts on larger screens.

plurals
  1. USCharlie
    primarykey
    data
    text
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COYes you are right. I solved a time ago. Basically the problem was that 'users' stored many sockets because I used the socket.id as a key, butwhen I reloaded the site... socket.id changed and stored once again the same user, so the solution is to change the key to something else (like a phone number, for instance). The code does not include all the issues, tho (just in case someone is in my situation). Thanks JR. for your answer.
      singulars
    2. COYeah I have seen those links. You mentioned something very important, though: "as long as your keeping all of the important information on the server" , that's exactly what I can't achieve; I can't keep the resources to emit the messages in the server.
      singulars
    3. COBecause as I understand, socket.id is used to track users. I login to the server with different accounts and browsers, so I send a event ,'msgToServer', when send a msg. On the server, what I print all users and their respective resources: 'socket'. If I use socket.id instead, when I do the same what I see as output is the same resource even though I have sent messages from different browsers and as you might expect... If I try to send an event(msg) from that resource (e.g. io.sockets.socket(clients[login])), which is the same in all browsers , such event(msg) is emitted to everyone
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload