I am trying to create a server app in node. Js, where many customers are connected, and then a data Sends it and sends the data to another specific customer. Which client is sent to this, which is determined by the 'User ID' that all clients send after connecting.
How can I keep track of customers when I connect? How can I get my specific customers? I know this is a very comprehensive question, but any pointers will be appreciated ...
Thanks!
Take a look at some existing open source node servers such as Socket.IO.
Socket.IO basically assigns a unique ID to each customer. ID is stored in a hash, which is used as a lookup to identify specific clients - You can broadcast the channel along with all the connected clients
Comments
Post a Comment