I have a clientid and username and i want them both send with the socket.
client.userid = userid;
client.username = username;
client.emit('onconnected', { id: client.userid, name: client.username });
i tried this for example but it doesn't seem to work