开发者

ActionScript 3 : Socket, amf, NetConnection, rtmp... Getting clear

开发者 https://www.devze.com 2023-02-13 06:26 出处:网络
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 betw

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!


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 implementing IExternalizable 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:

  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/Socket.html
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetConnection.html
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html
  • http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/SharedObject.html
  • http://livedocs.adobe.com/flex/3/html/help.html?content=metadata_3.html or http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/package.html#registerClassAlias()
0

精彩评论

暂无评论...
验证码 换一张
取 消