TAGS :Viewed: 16 - Published at: a few seconds ago

[ Connecting to a local socket server from SWF on remote page ]

I have a Kiosk that connects to a local socket server so it can access some hardware. If the kiosk code is stored locally, it can access the socket perfectly.

However, and I know for good reason, if the kiosk code is hosted on a remote server, it can not access the local socket server because of a sandbox violation.

The problem is that all of these kiosks are hosted on AppEngine, so when I am done making changes, it takes hours to render out to a single HTML file, and change all the css/js location links.

Is there anyway possible for the allow the SWF file to access the local socket server when it is hostel remotely?

Also, The socket server is a Java app that I dont have the source to. I run it locally through the terminal

Answer 1


I've had the same problem.

The thing is that with Flash player 10 security with sockets has become much stricter. Just placing crossdomain.xml on the server won't do anything - you actually have to send the crossdomain policy file to any client who connects.

The simplest solution is provided by Adobe - they've provided a couple of scripts, one perl and one python, which will set up a policy file server. You can find them here:

Setting up a socket policy server