是否可以在 Flash/ActionScript 中使用 UDP? [英] Is it possible to use UDP in Flash/ActionScript?

查看:23
本文介绍了是否可以在 Flash/ActionScript 中使用 UDP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

快速问题:是否有可能在 Flash/ActionScript 中执行 UDP 数据报套接字?

Quick question: is there possibility to do UDP datagram sockets in Flash/ActionScript?

推荐答案

在撰写本文时,答案是否定的.

BinarySocket 和 Xml Socket 都是基于 TCP/IP 的.正如 SpliFF 提到的,UDP 被添加到 Flash 10 中,主要用于 Flash Media Server 工具和 RTMFP.到目前为止,Adobe Stratus 是该协议的一个示例.http://labs.adobe.com/technologies/stratus/

Both BinarySocket and Xml Socket is TCP/IP based. As SpliFF mentions UDP is being added in Flash 10 mainly for Flash Media Server tools and for RTMFP. Adobe Stratus is an example of the protocol so far. http://labs.adobe.com/technologies/stratus/

不过,Adobe 当前的 UDP 样本都是基于点对点的.UDP 在 P2P 中具有优势,但在更大规模的多用户或 DVE(分布式虚拟环境)中更是如此,因此希望它成为未来的重点.

However current UDP samples from Adobe are all Peer-to-Peer based. UDP has benefits in P2P but more so in larger scale multiuser or DVEs (Distributed Virtual Environments) so hopefully it is focus going forward.

如果你想要一个游戏的 UDP Unity3D 目前在网络播放器中支持 UDP.或者使用 Java 的 jMonkeyEngine 支持它.即将推出的基于网络的 Torque 3D 也可能支持它.

If you want UDP for a game Unity3D currently supports UDP in the web player. Or jMonkeyEngine using Java supports it. Also Torque 3D web based coming soon may also support it.

然而,答案已经变成了肯定的;要了解现在如何实现,请参阅 ericsoco 的答案,了解如何使用 DatagramSocket 来实现这一目标.

However, the answer has since changed to a yes; to see how this is now possible, see ericsoco's answer on how to use DatagramSocket to achieve this.

这篇关于是否可以在 Flash/ActionScript 中使用 UDP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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