PHP和Flex应用程序之间的实时通信 [英] Real-Time communication between PHP and Flex application

查看:140
本文介绍了PHP和Flex应用程序之间的实时通信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Flex / AIR应用程序与PHP服务器应用程序进行通信。最近,我的客户请求实时类似的应用程序之间的连接,以取代我们目前有的;刷新按钮,必须单击以刷新数据。



因此,有效的服务器需要推动数据到客户端时,一些变化。我可以编写代码来检测什么时候发生了变化,但我不确定事情的推动力。



这里我最好的选择是什么?

解决方案

实际上,当使用Flash套接字(意味着绕过http协议)时,您可以将数据从服务器推送到客户端。如果你不能使用套接字,你可以使用诸如轮询,长轮询或http流 。然而,手工操作需要花费一些时间,所以我建议您查看已经具备此功能的产品。 WebOrb for PHP就是其中之一,从我所知道的是免费的。

I have a Flex/AIR application communicating with a PHP server application. Recently my client requested real-time-like connectivity between the applications to replace what we currently have; refresh buttons which have to be clicked to refresh data.

So effectively the server needs to push data to the client when something changes. I can write the code that detects when something changes, but I'm not sure about the push side of things.

What's my best option here?

解决方案

Actually you can push data from the server to the client, when using Flash sockets (which means bypassing the http protocol). If you cannot use sockets you can use things like polling, long polling or http streaming. However it will take a while to do everything by hand, so I suggest looking at a product which already has this features. WebOrb for PHP is one of them, and from what I know is free.

这篇关于PHP和Flex应用程序之间的实时通信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆