douan4106 2014-09-29 07:35
浏览 61


I tried to make long-polling with PHP myself, but it works terrible and eat a lot of processor time.

Is there any ready solutions of keeping a lot of connections (for comet or websockets) using PHP? Something like node.js or erlang?

  • 写回答

1条回答 默认 最新

  • doujianzhi3358 2014-10-02 15:34

    The closest thing to node.js on php is ReactPHP. Here are some benchmarks that compare the performance of node.js to ReactPHP.

    If you're working with websockets and looking for something closer to, but for PHP. I would suggest taking a look at Thruway (I'm one of the developers).

    Thruway is built on top of Ratchet (websocket library) and ReactPHP (event loop). It simplifies getting websockets working with PHP and gives you RPC and SubPub via the WAMPv2 protocol.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥20 Windows 驱动开发版本疑问相关
  • ¥15 MAC 未能打开磁盘映像
  • ¥15 fastcap使用,二维导体输入问题
  • ¥15 hosts修改后不能访问
  • ¥15 关于化学反应速率C++编译问题/FLUENT
  • ¥20 Yolov5训练报错
  • ¥15 Unity发布gzip压缩的webgl之后让浏览器可以正常显示画面
  • ¥15 Gridview插件数据更新失败问题
  • ¥15 有没有人知道这种提示怎么关?现在不做ts项目了不知道咋关了,求解,现在我以前的js项目都是这种提示了
  • ¥15 为什么mysql做了碎片化处理data_free还是很高