O'Reilly logo

Essential ActionScript 3.0 by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Socket Security

In ActionScript, socket connections are made with the XMLSocket, Socket, and NetConnection classes. Table 19-7 and Table 19-8 list the specific locations and ports to which the XMLSocket and Socket methods can open socket connections. The tables do not cover the NetConnection class, which is used with Adobe Flash Media Server and Adobe Flex. For information on NetConnection security, see the documentation for those products.

In both Table 19-7 and Table 19-8, distributor permission means the socket-server operator has made the appropriate cross-domain policy file available; see the section"Distributor Permissions (Policy Files)," later in this chapter.

Table 19-7 describes whether a remote .swf file can make a socket connection to the four locations listed.

Table 19-7. Remote sandbox authorized and prohibited socket connections

Local realm, any port

Remote realm, within .swf's region of origin, port 1024 and higher

Remote realm, within .swf's region of origin, port 1023 and lower

Remote realm, outside .swf 's region of origin, any port

Allowed by distributor permission only

Allowed

Allowed by distributor permission only

Allowed by distributor permission only

Table 19-8 describes whether a .swf file with the security-sandbox-type in the leftmost column can make a socket connection to the locations listed in the remaining columns.

Table 19-8. Local sandboxes authorized and prohibited socket connections

Security-sandbox-type

Local realm, any port

Remote realm, any port

Local-with-filesystem ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required