Comment by Nasser Torabzade on How to access cookie data inside a socket.io connection?

I think so! I have two separated functions in my app, one for serving files like this: http.createServer(onRequest).listen(httpPort); function onRequest (request, response) { // stuff for serving files } and another function for serving socket.io: io.sockets.on('connection', function (socket) { // stuff for handling events } and these two are called in my index.js , Do you think I need to change this architecture?

Leave a Reply

Your email address will not be published. Required fields are marked *