Implementaion :
1) first user1 subscibes to user2
in this step user1 sends subscribe message to presence server. if user2 is in online he will get one Notify message via server. if user2 not online then he will be in active_watchers table. whenever the user2 comes to online he will get one Notify from server.
2) if user2 online server will sends on Notify to user1 informing that user2 is online.
3)Each and every user will send his presentity using Publish messages. so if user registrated then i'm sending one Publish message form configuration script using pua_set_publish() function. pua_publish function sends one publish message to server with it's status. then server will transfer that message to all watchers who subscribed for this User( This user means user who sends Publish message). I think this is the main Concept i didn't tried it..
2) if user2 online server will sends on Notify to user1 informing that user2 is online.
3)Each and every user will send his presentity using Publish messages. so if user registrated then i'm sending one Publish message form configuration script using pua_set_publish() function. pua_publish function sends one publish message to server with it's status. then server will transfer that message to all watchers who subscribed for this User( This user means user who sends Publish message). I think this is the main Concept i didn't tried it..
0 comments: