动作插座VS的WebSocket插座、动作、WebSocket、VS

2023-09-08 11:45:21 作者:随过往流动

我工作的一个基于Flash的网络游戏。我有动作插座的WebSockets之间进行选择(或者更确切地说socket.io)。我不知道这是更好的选择。我倾向于动作插座,因为它(应该)将在所有浏览器的标准。随着socket.io,的WebSockets只能在HTML5中使用,它甚至可能会导致到轮询一些老的浏览器这是一个大问题。

I'm working on a Flash based networked game. I have to choose between ActionScript sockets and WebSockets (or more specifically socket.io). I'm wondering which is the better choice. I'm leaning toward ActionScript sockets since it (should) will be standard across all browsers. With socket.io, WebSockets can only be used in HTML5 and it can even result to polling for some older browsers which is a big issue.

你们会说的ActionScript套接字是更好的选择?

Would you guys say that ActionScript sockets is the better choice?

非常感谢你!

推荐答案

这个世界正在走向的WebSockets(和HTML5,在一般情况)。

The world is moving towards WebSockets (and HTML5, in general).

闪存正变得比以往任何时候都更具挑战性,因为许多平板电脑,智能手机(甚至 IE10中的Metro风格)不支持插件。 的Adobe宣布,他们将停止开发Flash的移动浏览器的。闪光可能是您的应用程序的目的确定,但它是pretty的明确,在这一点HTML5是方式更加面向未来比闪存。

Flash is becoming more challenging than ever, given that many tablets, smartphones (and even IE10 in Metro style) don't support plugins. Adobe announced that they will stop developing Flash for mobile browsers. Flash may be OK for the purposes of your application, but it's pretty clear that at this point HTML5 is way more "future proof" than Flash.

至于对HTML5的浏览器的支持,具体的WebSockets:一些WebSocket的服务器提供了非常巧妙的仿真技术,一方面允许开发人员code反对的WebSocket的API,在另一方面自动选择最佳的运输在特定情况下(浏览器,平台,代理服务器,路由器和其他中介机构)层。例如,的Kaazing WebSocket的网关 [披露:我换的Kaazing工作]做仿真非常好(看看这个博客帖子如果有兴趣的WebSocket仿真使用旧的浏览器,包括IE6)。

As for the browser support for HTML5 and specifically WebSockets: some of the WebSocket servers provide very clever emulation techniques that on one hand allow the developer to code against the WebSocket APIs, on the other hand automatically select the best transport layer under the given circumstances (browser, platform, proxies, routers, and other intermediaries). For example, the Kaazing WebSocket Gateway [disclosure: I work for Kaazing] does emulation exceptionally well (check out this blog post if interested in WebSocket emulation using older browsers, including IE6).

还有一件事:如果Flash是一个技术,你熟悉的,需要用于开发,拥有的Kaazing WebSocket的API,用于在Flash,Flex,空气(以及Java,.Net和明显的JavaScript),以及

And one more thing: if Flash is a technology you're familiar with and need to use for development, Kaazing has WebSocket APIs for Flash, Flex, Air (as well as Java, .Net, and obviously JavaScript) as well.

总之,我肯定会走到今天的WebSockets的路线。

Overall, I'd definitely go the WebSockets route today.