php: how i can replace the infinite while loop in client-server communication with someone else to achieve same server service

StackOverflow https://stackoverflow.com/questions/13303093

Question

I am building a client server real time communication application in php, where i want to implement true server push with optimization.

I know already the other techniques that came under Comet technique, for this i am using php socket server and socket applet client, every thing is going fine till now.

The problem is on server side infinite while that is used for listening incoming connections, it degrades my application's optimization.

How can I replace the infinite while loop in client-server communication with something else to achieve the server-push functionality? The moment a client pings the server, the connection is made to the client for communication.

Was it helpful?

Solution

If you want asynchronous server on PHP try PHPDaemon

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top