is it save to just add a property with a numerical id to a new websocket object and to identify a client with this id which was added by the server ?
server.js
//...
var a_o_websocket_client = []
o_websocket_server.on("connection", async function (o_websocket_client) {
console.log(`a new o_websocket_client connected: ${o_websocket_client}`)
o_websocket_client.n_id = a_o_websocket_client.length; // assign a new id
a_o_websocket_client.push(o_websocket_client)
o_websocket_client.on(
"message",
async function(s_message){
console.log(`this is the websocket with the id ${n_id}`)
}
)
});
//...