jeudi 19 février 2015

How can i get client request from socket.io connection?

My server renders any page with object for example: d = {userId: 20, post: 190, title: 'Post'} So, how can i get this object there:



io.on('connection', function (socket) {
clientReq = // how get it?
console.log(clientReq.userId);
});

Aucun commentaire:

Enregistrer un commentaire