I have this code:
var ss = io('/secure', { query: 'token='+string });
It used to pass the query parameter to the server that was accessible as socket.handshake.query with this code:
io.of('/secure').use(function(socket, next){
// ***
console.log( socket.handshake.query );
// validate token
next();
});
but now it is not working and the output of the console.log does not include the token property:
{ EIO: '3', transport: 'polling', t: '1410465157747-0' }
I also tried changing my syntax to syntax that I have seen elsewhere online...
var ss = io('/secure', { query: { 'token': string } });
and this does not add the query property to socket.handshake.query either...
Please help!
btw I am using socket.io 1.1.0