I am trying to make a web chat application which interacts with gtalk. was successful in sending messages to the gtalk user from my app. I am able to receive the message on to my server also if the gtalk user pings me from the other end, but the problem is how do I know that there is a message waiting. I could only think of an ajax hit every 5 secs or something. Is there a better way to implement it?
Thanks for your time.