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

문제

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.

도움이 되었습니까?

해결책

If you want asynchronous server on PHP try PHPDaemon

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top