Instant Messenger
Posted: Thu Oct 04, 2007 3:28 am
I am in a process of making an instant messenger something similar to gtalk.
Till now i have registered the user and using session info i know if the user is logged or not. When he is logged on i update the database table field online =1 and otherwise it is 0 .(1 represents (s)he is online). It's fine till here... But next I have to check after 2 seconds if the user is still logged on or has logged out.
Suppose he is currently logged then the db field says 1, now he logs out but then also the db field says 1 although it should say 0 (as user logged out). SAo my problem is how to know if the user is still logged on or not.
If there something like pinging that can be done ... it could be helpful but wiill take alot of resources...
suggestion/comments/links welcome
Till now i have registered the user and using session info i know if the user is logged or not. When he is logged on i update the database table field online =1 and otherwise it is 0 .(1 represents (s)he is online). It's fine till here... But next I have to check after 2 seconds if the user is still logged on or has logged out.
Suppose he is currently logged then the db field says 1, now he logs out but then also the db field says 1 although it should say 0 (as user logged out). SAo my problem is how to know if the user is still logged on or not.
If there something like pinging that can be done ... it could be helpful but wiill take alot of resources...
suggestion/comments/links welcome