Real-Time/Socket Connection
Flash Player supports lower-level, persistent socket connections, allowing you to create low-latency, real-time applications. Furthermore, with the use of binary sockets you can create Flex applications that communicate directly with services not otherwise directly accessible to Flash Player. For example, binary socket connections allow for the creation of mail clients, Virtual Network Computing (VNC) clients, and more.
Essentially, three types of socket connections are available from Flex applications.
- XML sockets
Socket connections that require a specific communication protocol.
- Binary sockets
Raw binary sockets.
- RTMP
Real Time Messaging Protocol is used not only for media (video, audio, etc.), but also for real-time data communication. RTMP is supported by Flex Data Services, Flash Media Server, and other third-party applications.
Each of these persistent socket connection options is quite specialized and nonspecific to Flex applications. Entire books can be (and have been) written about these topics. Therefore, our goal in this chapter is simply to make you aware of their existence rather than to detail their use. You can learn more about using ActionScript to communicate using socket connections in the ActionScript 3.0 Cookbook (O’Reilly).
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access