I'm quite new on node.js and now I'm learning socket.io. I'm developing an app step by step so, at this time, I have an app that can login an user, do crud operation in mysql and mongodb and upload files, all these operations are manage with some web pages with HTML and javascript technologies launched directly from restify. After that I'm tring to add socket functionality to, at this time, simple print who is online. So, before I have something like:
server.get('/login', function(req, res, next){ ... });
and now I have something like:
socket.on("login", function (req, res, next){ ... });
but, naturally, req and res are undefined! Are there the same objects into socket.io?