PHP和Flex应用程序之间的实时通信 [英] Real-Time communication between PHP and Flex application
问题描述
因此,有效的服务器需要推动数据到客户端时,一些变化。我可以编写代码来检测什么时候发生了变化,但我不确定事情的推动力。
这里我最好的选择是什么?
实际上,当使用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屋!