How to best send additional data upon socket connection?
Client:
socket.on(\'connect\',function(){ //I\'d like set some values and pass them up to t
this is my code on socket version 2.1.1
//client side var socket = io.connect(window.location.origin,{query:'loggeduser=user1'}); // server side io.socket.on('connection', function (socket) { console.log("loggeduser => " + socket.handshake.query.loggeduser); });