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

2.3k views Asked by At

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!

1

There are 1 answers

0
mizi_sk On BEST ANSWER

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: