What about socket.io .on('connect'), .on('disconnect').
You can get the time range user is logged, and then sum up these in db.On Tue, Aug 21, 2012 at 3:09 AM, Filipe <[email protected]> wrote: > Hi everyone! > > I have this scenario: Express, Socket.io and MongoDB. > > The problem: reward points to the user on how many seconds (or time in > general) he keeps logged in (with the Socket opened). > > This is for a chat site I'm building and I want to build a ranking > based on how many minutes users stay connected. I've already built all > the register/login/messages but now I'm in a dead end with this > problem. > > How would you solve this? > > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
