ActionScript 3:Socket、amf、NetConnection、rtmp...变得清晰
有人可以帮助我理解闪存客户端和服务器之间的二进制数据传输吗? rtmp 服务器如何工作?服务器和客户端之间如何传输视频?使用 Socket 和 NetConnection 有什么区别? rtmp-server只是一个支持amf序列化的套接字服务器吗?
如果有人向我解释这些方面,我会非常高兴。谢谢你!
Could someone help me understanding binary data transferring between flash client and server?
How do rtmp-servers work? How is video transferring between server and client? What's the difference between using Socket and NetConnection? Is rtmp-server just a socket server supporting amf serialization?
I'll be very happy, if someone explains me these aspects. Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Socket 低级类用于访问网络会话、创建 TCP 连接、可以发送原始字节或序列化对象。
AMF flash 对象编码为二进制数据,可以通过网络传输或保存到
SharedObject
。只有实现IExternalizable
的公共字段或类才会被序列化。使用元标记[RemoteClass(alias="com.foo.Bar")]
标记它们。NetConnection多种协议连接(RTMP、RTMPT、RTMPE和基于UDP的RTMPF),可以通过远程过程调用发送序列化对象
rtmp-server如何工作?取决于...打开端口并侦听来自客户端的 RTMP/TCP 连接。
RTMP服务器提供远程SharedObject,录制客户端发布的音频/视频NetStream并接收远程过程调用(netConnection.call(handler, ...params)),并可以重定向您的NetStream 直接发送到正在播放它的其他客户端/订阅者。
参考:
Socket low level class to access network session, creates TCP connection, can send raw bytes or serialized objects.
AMF flash object encoded to binary data that can be transfered via network or saved to
SharedObject
. Only public fields or classes implementingIExternalizable
are serialized. Mark them with meta tag[RemoteClass(alias="com.foo.Bar")]
.NetConnection many protocols connection (RTMP, RTMPT, RTMPE, and UDP based RTMPF), can send serialized objects via remote procedure calls
How rtmp-server works? Depends... opens port and listens for RTMP/TCP connection from client.
RTMP server offers remote SharedObject, recording audio/video NetStream published from client and receiveing remote procedure calls (netConnection.call(handler, ...params)) and can redirect your NetStream directly to other client/subscriber which is playing it.
reference: