COMET javascript library

梦想与她 提交于 2019-12-18 11:53:05

问题


I am looking for a simple and reliable Comet javascript library. I want to keep a persistent streaming of data from my server (via PHP script) to the client side. I tried building my own using the iframe technique, but there are lots of issues with safari which I experienced. I am just hoping someone else has created a simple library for it?


回答1:


There is a jquery comet plugin Probably the best version though is the Dojo library

I have a quick list of commands I used to get a jetty server with comet up and running here




回答2:


It's not just the javascript library that you need, but a server-side implementation as well. Depending on your needs, you'll need to pick a proper implementation.

You mentioned PHP, which is typically difficult with long-held requests. Other options include having a separate server for your comet requests, or using a SaaS solution, such as WebSync OnDemand.

Depending on which option you pick for the server, you will have one or more javascript clients available. But you need to determine your server implementation first, then use the appropriate javascript implementation to match.




回答3:


Have a look at http://www.ape-project.org/ Pretty quick setup process.




回答4:


have you tried JSON-RPC. Apparently Dojo has good support for it, though I haven't tried it thoroughly

JSON-RPC

Dojo Documentation



来源:https://stackoverflow.com/questions/916669/comet-javascript-library

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!