简体   繁体   中英

Long-lived connections (asynchronous server push) with Apache/PHP/Javascript?

I come from more of a Java background. In the last year or two, it's become somewhat popular to do server push over HTTP using long-lived HTTP connections in Comet . It's an extremely useful technique.

So I'm curious what the equivalent is with Apache + PHP + Javascript? One option I see is just using straight AJAX calls (eg with jQuery) but I don't really know how Apache handles them or how I can implement such a thing on the serverside with PHP. Any ideas? Any good resources on this kind of thing?

You can use Comet programming techniques in PHP. I think a good place to start is this post , describing how to implement Comet in PHP.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM