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

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

问题描述

我有一个与 PHP 服务器应用程序通信的 Flex/AIR 应用程序.最近,我的客户要求在应用程序之间建立类似实时的连接,以取代我们目前拥有的;必须点击刷新按钮才能刷新数据.

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.

我最好的选择是什么?

推荐答案

实际上,当使用 Flash 套接字时,您可以将数据从服务器推送到客户端(这意味着绕过 http 协议).如果您不能使用套接字,您可以使用轮询、长轮询或 http 流之类的东西.但是手动完成所有操作需要一段时间,因此我建议查看已经具有此功能的产品.PHP 的 WebOrb 就是其中之一,据我所知是免费的.

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天全站免登陆