i want to make a real-time update for my flash application. Instead on making it refresh each 30secs, i would prefer the push technology. What is the best way to push data in Actionscript 3 ?
相关问题
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- Converting Date with Time in PST into UTC format
- Displaying two fullscreen windows on two monitors
- Setting Page Title from a SWF
相关文章
- How to simultaneously read audio samples while rec
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- Libraries for text animation in Flex / Actionscrip
- Socket IO fails to connect within corporate networ
- How to upload BitmapData to a server (ActionScript
- Persistent connections between Flash client and Ja
- C# Charting - Reasonble Large Data Set and Real-ti
There are two popular options for implementing real-time updates: sockets and RTMP. There are advantages and disadvantages to each, but the primary deciding factor is usually your server infrastructure.
Sockets
Sockets provide the lowest-level functionality. This means you will need to implement a protocol in code on the client and on the server. However, the biggest advantage of this approach is that the it can be made to work any server-side technology that supports TCP/IP sockets. You can send data in whichever format you like, but the most efficient would be to use ActionScript Message Format (AMF) to transfer the data in binary format.
RTMP
Real-Time Media Protocol is a protocol developed by Adobe and implemented natively by the Flash Player. Using RTMP would require a specific server which can support the protocol. There are proprietary solutions, as well as free ones. The advantage of using RTMP is that much of the protocol is already implemented, and sharing data can be as simple as setting the value of a shared object - with the protocol handling the data transfer behind the scenes. RTMP encodes messages using AMF so bandwidth usage is efficient. The protocol also supports "tunneling" over HTTP, which means it resorts to polling over HTTP when an RTMP connection is not possible.
Here are some server-side solutions for implementing RTMP and/or AMF:
This entry on Wikipedia describes the RTMP protocol and available servers in more detail.