Need help with comet, and what to choose

后端 未结 2 604
星月不相逢
星月不相逢 2021-01-16 07:45

I\'m new to comet, but I have read about it and I realize that PHP is bad for comet long polling.

All of my project is written in CodeIgniter PHP Framework, so all m

2条回答
  •  既然无缘
    2021-01-16 08:10

    One solution is Ajax Push Engine - they dish out their own server for handling the connections with clients, but you can use whatever backend to feed data to APE - including PHP. You can also work with MySQL directly - see example one and two. Note: the APE server can only be run on Linux, BSD or Mac OS X (though, it would seem that a port to Windows should be possible, since it's written in pure C, AFAICT).

    The other one is NGiNX_HTTP_Push_Module - you use nginx as your push server (no need for an extra server running, like it's in APE's case) and the protocol is easy to work with/straightforward IMHO.

提交回复
热议问题