E
E
Erix Rolex2017-10-20 15:45:44
Node.js
Erix Rolex, 2017-10-20 15:45:44

WebSocket identification of each connection, how?

How to store connections and send msg to the right client is clear.
But how to understand that this msg came from Vasya and not from Petya?
Sample message { 'msg' : 'Hi!' }

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ilya Gerasimov, 2017-10-20
@Erixx

Add the message initiator object to the mailing list (i.e. the user who created this message)
{msg : 'msg', fromUser : ?}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question