Click here to Skip to main content
15,894,362 members
Please Sign up or sign in to vote.
4.67/5 (3 votes)
See more:
hello
i want to know that is a server can response automatically ?. when there is something for a user who is signed in.
i want to use this in my chat tool because i have to request at a specified time to get new msg. i want that when server has some new message it itself reply.

thanks in advance
Posted
Comments
Sergey Alexandrovich Kryukov 2-Jan-12 2:24am    
This is great that your came to this idea thinking about chat application! Good question; I voted 5 for this question, which happens to me very rarely.

Happy New Year!
--SA

This is not a usual stuff. In principle, it can, but the application such technologies are very limited, first of all, by the browsers. You could be better off using a custom chat client (not a Web browser). The techniques based on Ajax present hidden pull techniques anyway. The real thing is HTTP server push.

What you need to look at is called "server push". Please see:
http://en.wikipedia.org/wiki/Server-push[^].

—SA
 
Share this answer
 
v2
Better use timestamps with an interval of some milli seconds to look for any assigned tasks for server.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900