I am trying to use sockets with node.js, I succeded but I don\'t know how to differentiate clients in my code. The part concerning sockets is this:
var WebSo
you can use request header 'sec-websocket-key'
wss.on('connection', (ws, req) => { ws.id = req.headers['sec-websocket-key']; //statements... });